Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Gabotronix's avatar

Digital voucher implementation for restaurant discounts

Hi everybody, this is more of an implementation question than a code one so sorry, I have been tasked to create a web app where people can buy discounted packs of meals online using Stripe as payment gateway, I got everything set up except dor the digital voucher, that is how users will notify the servers in the restaurant that they purchased a discounted meal, that the meal they are ordering was not "activated" before ans that it's a valid voucher, basically I have thought of three options but I'm not sure which one is the best:

1)Slide to unlock, the digital voucher has a "Slide to Unlock" at the bottom, the customer should slide to unlock when the server is present, once the customer slides the component whould change to grren color if voucher is valid and won't be able to use that voucher again. This one is my favorite right now.

  1. QR code, pretty simple, the digitla voucher is a r code the server can scan in order to activate and check the voucher is valid. This is ok, have to think more on the implementation tho

  2. Purchasable code, when you purchase a discount you get an unique, one-use code, you show or tell your code to the server and he "activates" it via an API call from the web app admin panel. I don't quite like this, too much hassle

I'm open to all kinds of ideas

0 likes
1 reply
bugsysha's avatar

You are talking about UI implementation here, right? I think that you should look at some more famous franchises how they've implemented this feature and figure out which one you like most.

Please or to participate in this conversation.