Add a card to a digital wallet from a website
Mint the payload Apple’s or Google’s web “Add to Wallet” button needs to add the card to the cardholder’s wallet from your website (web push provisioning). Call it from your backend when the button asks for the card: from Apple’s jwsResolver, or from Google’s onSessionCreated with the three values it supplies. Hand the response straight to the wallet’s script.
The payload is encrypted to the wallet provider’s keys, so neither your site nor your servers ever see card data. Do not store or log it; it is valid for one attempt. Authenticate the cardholder before calling.
Web push provisioning is enabled per website by the card issuer and needs each wallet provider’s approval of your site. Until then the call returns 409 CONFLICT. See Digital wallet tokenization.
Only ACTIVE cards can be added. Every call is audit-logged with the requesting actor and the target wallet.
Authorizations
API token authentication using format <api token id>:<api client secret>
Path Parameters
System-generated unique card identifier
Body
- Apple Pay Web Tokenization Request
- Google Pay Web Tokenization Request
Fields shared by every web add-to-wallet request. Send them from your backend when the wallet provider's web button asks for the card.
Discriminator value identifying an Apple Pay request. Apple's web button needs nothing else from the page.
APPLE_PAY "APPLE_PAY"
Response
Provisioning payload minted.
- Apple Pay Web Tokenization Response
- Google Pay Web Tokenization Response
Fields shared by every web add-to-wallet response. The payload is encrypted to the wallet provider's keys and signed for its web script: hand it to the script unchanged. It is valid for one attempt; do not store or log it.