Supported Wallet Elements
button, onCapture, onError, onCancel).
googlePay() also supports colorScheme and allowedAuthMethods.
Options
Event Lifecycle
Button Behavior
Wallet Availability
Apple Pay and Google Pay buttons are not rendered when the environment does not support them. This happens silently —mount() resolves without rendering any visible element. Conditions that prevent rendering include:
- Non-HTTPS origin
- Browser or device without wallet support
- No card in the wallet that is eligible under your configuration
- Apple Pay domain not verified (Apple Pay only)
- Google Pay wallet holding only account-saved cards, on the default
allowedAuthMethods: ['THREE_DS']— enablingUNAUTHENTICATEDremoves this case
Apple Pay Domain Verification
Before going live:- Download the Apple Pay domain association file. Keep the filename exactly as it downloads —
apple-developer-merchantid-domain-associationwith no extension. - Host it on every domain and subdomain where Apple Pay is used, at the exact path
/.well-known/apple-developer-merchantid-domain-association, served over HTTPS. - Let Rinne know which domains and subdomains to register so they can be submitted to Apple for verification.
onCapture Contract
onCapture gives you encrypted wallet card data, payment method, and the transaction object you created.
card_data is a discriminated union, not a single flat interface. wallet_type separates the wallets, and for Google Pay authentication_type separates its two shapes:
undefined:
wallet_type before authentication_type. Apple Pay sets authentication_type to '3DS' only on some captures, so one that arrives without it would otherwise fall into the branch you wrote for the unauthenticated Google Pay shape.
GooglePayMountOptions is generic in the methods you allow, so onCapture receives only the shapes your selection can produce. With allowedAuthMethods omitted or set to ['THREE_DS'], you get GooglePayThreeDsCardData directly and no narrowing is needed.payment_method is inferred from wallet funding data and defaults to CREDIT_CARD when funding type is not provided by the provider.
allowedAuthMethods (Google Pay)
allowedAuthMethods selects which card credentials Google Pay may return. It defaults to ['THREE_DS'] — only device-tokenized cards carrying a 3DS cryptogram. Leave the option out and that is what you get, so nothing widens what you accept unless you ask for it.
Enable
UNAUTHENTICATED only if your organization has made that call, and consider running 3DS on those payments.THREE_DS and UNAUTHENTICATED are the only values the option accepts. Note that the THREE_DS option value is not the same string as authentication_type: '3DS' in the captured card_data, which is the API’s wire value.Payload differences
The two methods return differentcard_data shapes:
The missing
authentication_type is the marker to branch on server-side if you apply different risk rules to unauthenticated payments. Both shapes go to the standard API host — the PAN is already encrypted before it reaches the SDK, so the PCI endpoints are not involved.
A malformed payload now fails the payment instead of being downgraded. A Google Pay token missing
tokenServiceProvider throws Google Pay network token is missing tokenServiceProvider rather than falling back to the PAN shape, and a payload with no card at all throws Google Pay response must contain either a network token or a card number. Both surface through fail() like any other capture error.colorScheme (Google Pay)
UsecolorScheme to align the Google Pay iframe with your page theme.
Mount and Unmount
mount() accepts either a CSS selector or an HTMLElement.Mount Errors
mount() throws if the target is missing or the provider cannot render the wallet button.

