createWalletButton to add Apple Pay and Google Pay to your checkout. When the shopper taps the button, the native payment sheet — handled entirely by Apple or Google — appears. The shopper selects their card and authenticates with Face ID, Touch ID, or their device PIN. Therius decrypts the resulting payment token server-side so you never touch the raw encrypted payload.
Basic usage
ImportcreateWalletButton and mount it into a container element. The onToken callback fires after the shopper completes the native payment sheet.
Google Pay
Swaptype: 'googlepay' to render a Google Pay button. The rest of the API is identical.
Saving a wallet card for future use
To vault the wallet card for future merchant-initiated transactions (MIT), includewalletData.tokenize: true and a shopper.id on the server-side charge:
sdk.authorizeToken() without requiring another wallet interaction. See Saved Cards for details.
Prerequisites
Apple Pay
Requires a valid Apple Merchant ID and a domain verification file served at
/.well-known/apple-developer-merchantid-domain-association on your domain. Configure this in your Therius dashboard under Connections.Google Pay
Requires your Google Merchant ID, registered with Google Pay & Wallet Console. Configure this in your Therius dashboard under Connections.
Further reading
See Apple Pay —applepay and Google Pay — googlepay in the Connections tab for the server-side request shape, including how to handle recurring billing agreements.
