Skip to main content

Google Pay™

Create

Decrypts a Google Pay™ payment method token and creates either a Google Pay™ resource or a Basis Theory's Token Intent based on the provided encrypted token. This endpoint only supports the ECv2 token versions. It supports both auth methods, PAN_ONLY and CRYPTOGRAM_3DS.

Basis Theory supports the PAN_ONLY and CRYPTOGRAM_3DS authorization methods. The table below shows the resulting resources based on the Google Pay payment method token's authMethod attribute.

Auth MethodResource Type
PAN_ONLYtoken_intent
CRYPTOGRAM_3DSgoogle_pay
POST
https://api.basistheory.com/google-pay
Copy

Permissions

google-pay:create

Request

curl --request POST \
--url https://api.basistheory.com/google-pay \
--header 'BT-API-KEY: <API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"expires_at": "2030-12-25"
"google_payment_data": {
"protocolVersion": "...",
"signature": "...",
"intermediateSigningKey": {
"signedKey": "...",
"signatures": ["...", "..."]
},
"signedMessage": "...
}
}'

Request Parameters

AttributeRequiredDescription
expires_atfalseAn optional expiration date for the token. If blank, no expiration date is set for the token.
google_payment_datatrueThe Google Pay™ resource.

Response

Returns a Google Pay™ resource for tokenized cards that consists of device PAN and cryptograms. The return will include the Card BIN enrichments. Returns an error if there were validation errors, if the Google Pay™ payment method token failed to decrypt or the token failed to create.

{
"google_pay": {
"id": "b7248b11-acfb-4695-93a9-9609f90ec038",
"tenant_id": "...",
"status": "active",
"expires_at": "2030-12-25T00:00:00+00:00",
"created_by": "50c63e9b-91e5-4a6a-9f9e-81088d106f2c",
"created_at": "2025-08-06T11:02:53.9261435+00:00",
"fingerprint": "7bAjvyqJqfPc4jRjniEk87vNrjR74Xax1HnMREWsTiMz",
"card": {
"bin": "411111",
"last4": "1111",
"expiration_month": 12,
"expiration_year": 2027,
"brand": "visa",
"funding": "debit",
"authentication": "sca_required"
},
"details": {
"tsp": "Google",
"auth_method": "PAN_ONLY",
"message_id": "AH2EjtdkuuxxO3nA7RuWAo0fU4u5BPoySvd9ajlSSrTWy3yTCu2IRbRwp8K3sFjSUS-ELa7UzetwY6UFsNLISYiKY6arNIOfYxutYYH3LJdIH0UcmoRDzmM",
"eci_indicator": "",
"assurance_details": {
"account_verified": true,
"card_holder_authenticated": false
}
}
}
}

For encrypted cards with an authorization method of "PAN_ONLY", a Token Intent will be created. Refer to Token Intents documentation for more information.

To compute the fingerprint for Google Pay™ resources, the system utilizes the card number contained within the encrypted payment token.

Retrieve

Retrieves an already tokenized Google Pay™ resource. For encrypted cards with an authorization method of "PAN_ONLY" use Token Intents documentation.

GET
https://api.basistheory.com/google-pay/{:id}
Copy

Permissions

google-pay:read google-pay:reveal

Request

curl --request GET \
--url https://api.basistheory.com/google-pay/3c367ed4-678d-4b98-9cec-d7eaa0f0c26e \
--header 'BT-API-KEY: <API_KEY>'

Response

Returns a Google Pay™ resource. If the application has google-pay:reveal, then the data element will contain the unencrypted card information. If the application has google-pay:read, then the data element will contain masked card information.

{
"id": "99978b31-78e8-4751-926c-83775bfb126b",
"tenant_id": "eb210708-f709-495f-b4de-b9e3877bd4c3",
"status": "active",
"expires_at": "2025-12-25T00:00:00+00:00",
"created_by": "c1847894-2f72-4999-a47d-bf9a12d19ca9",
"created_at": "2025-08-04T16:19:50.9013495+00:00",
"fingerprint": "7bAjvyqJqfPc4jRjniEk87vNrjR74Xax1HnMREWsTiMz",
"card": {
"bin": "42424242",
"last4": "4242",
"expiration_month": 6,
"expiration_year": 2025,
"brand": "mastercard",
"funding": "credit",
"authentication": "sca_required",
"issuer": {
"country": "PL",
"name": "3DS Test Cards (TEST)"
},
"issuer_country": {
"alpha2": "PL",
"name": "Bermuda",
"numeric": "369"
},
"segment": "Commercial"
},
"data": {
"number": "4242424242424242",
"expiration_month": 6,
"expiration_year": 2025
},
"authentication": {
"threeds_cryptogram": "AAAAAA=",
"eci_indicator": "7"
}
}

Google Pay™ resources created from a Google Pay™ payment method token will contain a details attribute.

AttributeTypeDescription
detailsObjectDetails related to the transaction service provider (TSP).
tspStringThe name of the transaction service provider.
auth_methodStringThe authentication method used.
message_idStringUnique identifier for the message.
eci_indicatorStringElectronic Commerce Indicator (may be empty).
assurance_detailsObjectInformation about the assurance of the transaction.
account_verifiedBooleanIndicates if the account was verified.
card_holder_authenticatedBooleanIndicates if the cardholder was authenticated.

Delete

Deletes an already tokenized Google Pay™ resource. For encrypted cards with an authorization method of "PAN_ONLY" use Token Intents documentation.

DELETE
https://api.basistheory.com/google-pay/{:id}
Copy

Permissions

google-pay:delete

Request

curl --request DELETE \
--url https://api.basistheory.com/google-pay/3c367ed4-678d-4b98-9cec-d7eaa0f0c26e \
--header 'BT-API-KEY: <API_KEY>'

Response

Returns a Google Pay™ resource with summarized information.

{
"id": "99978b31-78e8-4751-926c-83775bfb126b",
"tenant_id": "eb210708-f709-495f-b4de-b9e3877bd4c3",
"status": "active",
"expires_at": "2025-12-25T00:00:00+00:00"
}