Skip to main content

Serve wallets over HTTPS

Apple Pay does not render on http:// origins. Google Pay requires HTTPS in production. Test on https:// (or use your staging domain) rather than localhost where possible.

List wallets first when prominent

Wallet buttons convert much better than card forms on supporting devices. If wallets are the primary experience, list them first:
Wallets that fail their availability check are hidden without shifting the remaining methods.

Match your button to the sheet

Wallet buttons are visually distinct on purpose. Pass the per-provider buttonType / buttonStyle (Apple) or buttonType / buttonColor (Google) options to match your surrounding UI, but keep the sheet’s own branding intact.

Require only what you need

Every requirement you set on require puts an extra field in the sheet the shopper must complete. Set email, phone, billingAddress, and shippingAddress only when your integration needs them.

Handle onClick for gating

If you need to run a check before opening the sheet (agreement acceptance, minimum order value, live inventory), listen for onClick. Return false from the handler to prevent the sheet from opening.

Update transaction on cart changes

When the cart total changes, forward it to the wallet element with .update(...):

Add the CSP entries you need

If you set a Content Security Policy, allow the wallet-specific domains that render the sheet and buttons. See the Installation page for the baseline entries; consult your provider’s CSP guidance for wallet-specific hosts.

Next steps

Last modified on July 17, 2026