How can I create (and is it possible at all) discount cards for a coffee shop using Apple Wallet and iOS APIs?
The effect I want to get is the following: iOS users should have a personal card in Apple Wallet which they will bring to the coffee shop. In the coffee shop there will be a scanner which can add score for each scan and nullify it when the score reaches let's say 7 scans (so users will have each 7-th cup of coffee for free).
Creating a Apple Wallet pass is described here: Apple Docs
You edit the pass.json
describing your pass, then you can sign it using Apples signpass
tool after you have registered a pass type identifier and found your Team ID. If you want to update the pass to display the information to customers, you would need a server that implements the web service API.
As Paulw11 has said, you will need some sort of scanner to read the data from customers passes. One way is QR codes, in which your cashier will hold a camera to the QR code on the pass to read the customer info, usually it will just be a unique ID which you have mapped to a customer account. Another possibility is using NFC so the customer taps their phone to a NFC reader which will transmit their unique ID for you to process.