Google Pay for API only
Last updated: July 15, 2026
To accept Google Pay payments, you must:
- Retrieve the Google Pay payment data.
- Tokenize the payment data.
- Request a Google Pay payment.
If your PCI compliance enables you to handle encrypted data directly, you can decrypt the Google Pay token yourself and send it to Checkout.com for processing.
- Follow the integration guides, depending on the platform you are integrating:
- Register your domain and obtain your Google merchant ID through the Google Pay & Wallet Console. For web integrations, you can use the Enroll an entity to the Google Pay Service endpoint instead.
Note
Android integrations do not support domain registration through the Enroll an entity to the Google Pay Service endpoint.
When you submit a payment data request to the Google Pay API, you must configure your PaymentDataRequest Google pay object setting the following parameters:
gatewayset tocheckoutltdgatewayMerchantIdset to your public keyallowedCardNetworksset to the card schemes you want to accept
1private fun cardParameters(): JSONObject {2return JSONObject().apply {3put("allowedAuthMethods", JSONArray(listOf("PAN_ONLY", "CRYPTOGRAM_3DS")))4put("allowedCardNetworks", JSONArray(listOf("AMEX", "DISCOVER", "MASTERCARD", "VISA")))5}6}78private fun gatewayTokenizationSpecification(): JSONObject {9return JSONObject().apply {10put("type", "PAYMENT_GATEWAY")11put("parameters", JSONObject(mapOf(12"gateway" to "checkoutltd",13"gatewayMerchantId" to "pk_sbox_o2nulev4vbo43i4qkb5p7lfijap"14)))15}16}1718private fun cardPaymentMethod(): JSONObject {19return JSONObject().apply {20put("type", "CARD")21put("parameters", cardParameters())22put("tokenizationSpecification", gatewayTokenizationSpecification())23}24}
For more information about Google Pay API PaymentDataRequest object, see the Google Developer documentation for Android
The tokenizationData.token property returned in the PaymentMethodData object contains the payment data.
1{2"type": "CARD",3"description": "Visa••••1234",4"info": {5"cardNetwork": "VISA",6"cardDetails": "1234"7},8"tokenizationData": {9"type": "PAYMENT_GATEWAY",10"token": "examplePaymentMethodToken"11}12}
When you receive the payment data from Google, call the Request a token endpoint to tokenize the encrypted payment data.
Note
To process Google Pay transactions, you must authenticate your request using the same public key you provided to the Google Pay API in the gatewayMerchantId parameter.
Information
Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see API endpoints.
post
https://{prefix}.api.checkout.com/tokens
1{2"type": "googlepay",3"token_data": {4"protocolVersion": "ECv1",5"signature": "TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ",6"signedMessage": "{\"encryptedMessage\": \"ZW5jcnlwdGVkTWVzc2FnZQ==\", \"ephemeralPublicKey\": \"ZXBoZW1lcmFsUHVibGljS2V5\", \"tag\": \"c2lnbmF0dXJl\"}"7}8}
1{2"type": "googlepay",3"token": "tok_ubfj2q76miwundwlk72vxt2i7q",4"expires_on": "2026-09-15T11:14:15Z"5}
Use the token value from the token field in your payment request.
Call the Request a payment endpoint, setting the following fields, depending on the token format you want to use:
Information
Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see API endpoints.
post
https://{prefix}.api.checkout.com/payments
To request a payment using the Checkout.com token, set the following fields:
source.typeset totokentokenset to the value of thetokenfield in you got in the tokenize the Google Pay payment data response.
1{2"source": {3"type": "token",4"token": "tok_ubfj2q76miwundwlk72vxt2i7q"5},6"amount": 1000,7"currency": "USD"8}
If the approved field is true, your authorization was successful. A failed authorization can indicate the payment used an invalid or expired card, or a card with an insufficient available balance.
A successful response includes a payment_account_reference value, which is a unique reference to the underlying card for network tokens. If the card scheme provides an eci value, the response includes it. The value indicates the security level that the card scheme decided to request the payment with.
To test Google Pay payments, first create a test Checkout.com account.
Use Google's built-in test card suite to add mock test cards to your wallet and simulate different payment flows.
You can disable the test card suite to test with your real cards. In this case, Google mocks the response using a generic test card.
If you perform a payment with a real card in Google's sandbox environment, Google Pay provides a test card in the encrypted payment data. This ensures that no actual transaction takes place. This automatic payment data encryption for testing is unique to Google Pay. Do not perform tests for any other payment method using real card numbers or card details in your sandbox environment.
Note
Google validates your Google merchant ID in the Production environment, but not in the Sandbox environment. Register with the Google Pay & Wallet Console and obtain a valid merchant ID before moving to Production. For web integrations, you can optionally register your domain and merchant ID through the Enroll an entity to the Google Pay Service endpoint instead.