You won't be able to do this with normal home grade network equipment. I've never seen this on home routers.
You can do this with Ubiquiti wifi access points(not too expensive small business grade equipment) and a PC running ubiquiti's Unifi software, or a Ubiquiti Dream Machine Pro router running Unifi Software or a cheap raspberry pi running unifi software.
Here's the guide on what it looks like:
https://help.ui.com/hc/en-us/articl...Guest-Network-Guest-Portal-and-Hotspot-System
You can set up a captive portal, where they have to click accept to proceed, or use a universal hotel password, or facebook wifi where they have to log into their facebook credentials, or you can do a voucher system.
Here's what the facebook login looks like:
https://help.ui.com/hc/en-us/articl...-Using-Facebook-Wi-Fi-for-Guest-Authorization
Most low volume businesses might be best off with using guest vouchers. You can set a time limit for when it expires and print out the voucher or email it to them. Once they're gone, they no longer have access to the wifi.
Ubiquiti's Unifi software assumes you have some networking knowledge, if you know a tech guru or have a tech savvy teen, they might be able to set it all up for you. After that's done, they can create a desktop shortcut to the voucher page so you can make and print new vouchers easily.