Apple Pay & Google Pay
Time: ~25 minutes | Difficulty: Intermediate | Type: part of ExamplesFinished project:
apple-google-tokenization. Clone it if you want working wallet buttons first — or keep reading for the two things that actually differ from a card payment.TagadaToken, and from there the flow is byte-for-byte the card tokenization flow — payment instrument, optional 3DS, charge. One charge path, three ways in.
The two wallet-specific parts
1. The buttons.@tagadapay/core-js ships both wallet session helpers. Each opens the native
sheet and hands you the resulting token in onSuccess:
Both helpers take
(config, request, callbacks) and return void — they are not promises. The
token arrives in onSuccess, and for Apple Pay what onSuccess returns is what the sheet shows.
For the full wallet reference, including domain registration and
which processors accept wallets, see
Apple Pay & Google Pay.TagadaToken — payment instrument, SCA detection, 3DS challenge, charge — is covered in Card tokenization & 3DS and is shared code in this demo.
Run it — Apple Pay needs HTTPS
Google Pay and the card form work straight onlocalhost. Apple Pay refuses non-HTTPS pages, so tunnel your dev server:
1
Start the demo
2
Tunnel with ngrok
3
Open the HTTPS URL in Safari
Open the
https://….ngrok.io URL in Safari on a device with a card in Wallet — the Apple Pay button lights up and the full flow works, 3DS included.Next
Finished project on GitHub
Wallet buttons, card form, 3DS — all three entry points in one app
Card tokenization & 3DS
The shared charge path this demo plugs into
core-js reference
Wallet sections included — full API detail
Choose your integration
Wallets on a TagadaPay-managed cart? That’s the Headless SDK path
