Wifi password change on every customer receipt

Dear concerned . This is my second topic hope someone can help me or may be it required some coding. Suppose I am running a restaurant And want to provide free wifi to customer whom bill is over 500 Rs. Indian currency. The wifi password should print automatically to customer invoice receipt but this password should be valid for only 15 min. Or let’s say 30 min according to me as I want to provide. After 15 or 30 min the connection should be break with internet automatically with some message let’s say" you have reached the free wifi limit". Further more if next customer comes and he order more than 500 Rs order then his receipt shows him again wifi password but it should be different from the previous customer. So the whole point is password should be different -2 on every customer bill . The password never be repeated. So no body can use my internet data free of cost again and again without eating in my restaurant . password will expire once and would never repeat . Hope expertise have understood my requirement. Thanks a lot in advance

Not possible in the way you describe.
Actual wifi password couldn’t be dynamic like that unless you use a radius wpa enterprise setup which requires a username and password as part of the connecting to the wifi.
You better option is not to use wifi password but setup a captive portal gateway on the public network.