How to add 'Add to Wallet' button to website to add coupons to Apple Wallet and Google Pay accounts

How to add 'Add to Wallet' button to website to add coupons to Apple Wallet and Google Pay accounts



First off, I don't even know where to begin with this. I've tried reading through the documentation from Apple and Google, but still don't have the right answers.



My client already displays coupons on their site, which their customers either print or take a screenshot on their phone, to bring into the store to scan for the discount to be applied. They would now like to add the 'Add to Wallet' button to their coupon page so that the user can just add the coupon to their Apple Wallet or Google Pay account.



What steps are involved to do this? I understand that we will have to connect to the Apple/Google APIs to integrate with our site. I'm more confused about how these coupons or 'passes' are generated? It looks like there are plenty of third party services that help you create these passes, but can we do it ourselves? What's involved here?



If anyone has any experience doing exactly this and can give me a helping hand, or point me in the right direction of some good documentation, that would be greatly appreciated!





Can you mark my answer as the correct one.
– Scott Condron
Sep 6 at 12:15




1 Answer
1



There's two different processes for both pass types:



Apple Wallet



Creating an Apple Wallet pass is described here: Apple Docs.
You edit the pass.json describing your pass, then you can sign it using Apple's signpass tool after you have registered a pass type identifier and found your Team ID.


pass.json


signpass



If you want to update the pass to display the information to customers, you would need a server that implements the web service API.



The "Add to Apple Wallet" button would be a image with a link to the .pkpass file you've generated for your customer. There are a few open source tools to create passes on the fly with your language of choice (e.g here).



Google Pay



Here is the docs for creating Google Pay passes. There's an initial bit of signing up to do, then you need to register credentials but after that initial pain, you can create passes and there are a few quick start applications to do so.



Once your pass (in Google terms it's Objects and Classes) is created, how you link the pass is different than Apple and requires embedding a snippet with a signed JWT for the "Save to Google Pay" button to appear, described better here.



If you want to update the pass to display the information to customers, you can interact with a REST API. Here are it's reference docs.



It looks like there are plenty of third party services



As you can see, it's quite the pain to do all this so it makes sense for companies to try to improve the developer experience. At PassNinja we're focusing on making a unified API to make this a lot easier, especially for NFC enabled passes.



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Some of your past answers have not been well-received, and you're in danger of being blocked from answering.



Please pay close attention to the following guidance:



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)