Tokenize Google Pay
Turn a Google Pay payment into a stored wallet token. Pass the PaymentMethodToken envelope exactly as Google Pay returns it — Guardian verifies the ECv2 signature chain and decrypts the payload server-side, so the decrypted card data never touches your systems.
The resulting wallet token carries one of two authentication methods, reflected in the auth_method field:
CRYPTOGRAM_3DS— a device-bound token with DPAN and cryptogram, forwardable once.PAN_ONLY— a card-on-file token with the funding PAN, forwardable repeatedly and eligible for promotion to a network token.
Tokenization is idempotent on the encrypted payload: resubmitting the same envelope, with or without an idempotency key, returns the existing wallet token. If that payload’s token was already deleted, the request returns 409 with the classifier GOOGLE_PAY_DUPLICATE_PAYLOAD. On an instance where idempotency isn’t switched on, every resubmission returns that 409. Rejected envelopes return 422 with a classifier naming the cause: GOOGLE_PAY_SIGNATURE_INVALID, GOOGLE_PAY_DECRYPTION_FAILED, GOOGLE_PAY_TOKEN_EXPIRED, or GOOGLE_PAY_MALFORMED_TOKEN.
Send X-Idempotency-Key to make the request safe to retry. A repeat returns the original outcome with Idempotent-Replayed: true: the wallet token as Get wallet token details renders it now, never a cryptogram. A key reused with a different request returns 422 IDEMPOTENCY_KEY_MISMATCH, and a repeat while the original runs returns 409 IDEMPOTENCY_KEY_IN_USE. See Idempotency.
See Google Pay for prerequisites and the full flow.
Authorizations
Headers
Makes the write safe to retry. A repeat with the same key, by the same credential, with the same request within 24 hours returns the original outcome with Idempotent-Replayed: true instead of executing again. 1 to 255 visible ASCII characters, sent once. Must not contain card data. See Idempotency.
1 - 255^[!-~]+$"google-pay-7f3c2a9e-0001"
Body
Response
Success response. A payload already tokenized on this instance, with or without an idempotency key, returns the original wallet token. On an instance where idempotency isn't switched on, such a repeat returns 409 GOOGLE_PAY_DUPLICATE_PAYLOAD instead.
The authentication method of the wallet credential. An Apple Pay token is always CRYPTOGRAM_3DS. Determines which placeholders are available when forwarding and whether the token can be promoted.
PAN_ONLY, CRYPTOGRAM_3DS