Process an online transaction using Google Pay.
To accept Google Pay, you must decrypt the payment token on your backend before submitting the transaction.
The flow is:
- Collect the payment token from the Google Pay sheet on the client device.
- Decrypt the token using POST /v1/wallets/GooglePay/decrypt-token.
- Submit the decrypted card details using the card-not-present card type with
walletTypeset toGooglePay.
If the decrypt response includes paymentMethodDetails.cryptogram, map it to threeDSecureData.cardHolderAuthenticationVerificationValue and paymentMethodDetails.eciIndicator to threeDSecureData.electronicCommerceIndicator. If there is no cryptogram, use threeDSecureData.authenticationId from PXP 3D Secure.
Use the following request after you have decrypted the Google Pay token on your backend.
{
"merchant": "MERCHANT-1",
"site": "SITE-1",
"merchantTransactionId": "This_is_my_merchant_transaction_id",
"merchantTransactionGroupId": "This_is_my_merchant_transaction_group_id",
"merchantTransactionDate": "2024-01-27 08:51:02.826445+00:00",
"transactionMethod": {
"intent": "Authorisation",
"entryType": "Ecom",
"fundingType": "Card"
},
"amounts": {
"transaction": 30.32,
"currencyCode": "EUR"
},
"fundingData": {
"card": {
"primaryAccountNumber": "4111111111111111",
"expiryMonth": "03",
"expiryYear": "2027",
"holderName": "John Doe",
"walletType": "GooglePay"
}
},
"shopper": {
"id": "Shopper_01",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1980-03-01",
"email": "shopper@example.com"
}
}| Parameter | Description |
|---|---|
merchantstring (≤ 20 characters) required | Your unique merchant identifier, as assigned by PXP. |
sitestring (≤ 20 characters) required | Your unique site identifier, as assigned by PXP. |
merchantTransactionIdstring (≤ 50 characters) required | A unique identifier for this transaction. |
merchantTransactionGroupIdstring (≤ 50 characters) | A unique identifier for grouping related transactions. Only valid when transactionMethod.entryType is Ecom. |
merchantTransactionDatedate-time required | The date and time when the transaction happened, in ISO 8601 format. |
transactionMethodobject required | Details about the transaction method. |
transactionMethod.entryTypestring required | The entry type. For e-commerce transactions, this is always Ecom. |
transactionMethod.fundingTypestring required | The funding type. For card transactions, this is always Card. |
transactionMethod.intentstring required | The payment intent. Learn more about intents. Possible values:
|
amountsobject required | Details about the transaction amount. |
amounts.transactionnumber | The transaction amount. The numbers after the decimal will be zero padded if they are less than the expected currencyCode exponent. For example, GBP 1.1 = GBP 1.10, EUR 1 = EUR 1.00, or BHD 1.3 = 1.300. The transaction will be rejected if numbers after the decimal are greater than the expected currencyCode exponent (e.g., GBP 1.234), or if a decimal is supplied when the currencyCode exponent does not require it (e.g., JPY 1.0). |
amounts.currencyCodestring (1-3 characters) required | The currency code associated with the transaction, in ISO 4217 format. |
fundingDataobject required | Details about the payment method used for the transaction. |
fundingData.cardobject required | Card not present details for a decrypted Google Pay token. Set walletType to GooglePay. |
fundingData.card.primaryAccountNumberstring (13-19 characters) required | The unique number assigned to a payment card, such as a credit or debit card. Map from paymentMethodDetails.pan in the decrypt response. |
fundingData.card.expiryMonthstring (2 characters) | The expiry month (MM) of the card. Map from paymentMethodDetails.expirationMonth in the decrypt response. |
fundingData.card.expiryYearstring (4 characters) | The expiry year (YYYY) of the card. Map from paymentMethodDetails.expirationYear in the decrypt response. |
fundingData.card.holderNamestring (≤ 50 characters) | The full name of the individual who owns the payment card. |
fundingData.card.walletTypestring required | The digital wallet used for this card not present transaction. Set to GooglePay when submitting decrypted Google Pay card details. |
threeDSecureDataobject | If the decrypt response includes paymentMethodDetails.cryptogram, map it to cardHolderAuthenticationVerificationValue and paymentMethodDetails.eciIndicator to electronicCommerceIndicator. If there's no cryptogram, use authenticationId from PXP 3D Secure. |
fundingData.card.dynamicDescriptorsobject | Optional merchant-defined descriptors that appear on the cardholder's statement. Learn more about dynamic descriptors. |
fundingData.card.dynamicDescriptors.cardAcceptorNamestring (≤ 22 characters) | A description of the transaction that will appear on the cardholder's statement. |
shopperobject | Details about the shopper making the payment. |
If your request is successful, you'll receive a 200 response that includes the transaction's state. You'll also receive a Transaction (Card Authorised) webhook notification. Learn more about webhooks.
{
"state": "Authorised",
"stateData": {},
"approvalCode": "676821",
"merchantTransactionDate": "2025-03-31T10:39:37",
"merchantTransactionId": "08081f55-6b8b-45d5-b097-3450dfff61e7",
"systemTransactionId": "7cf52570-9ca3-4423-b246-e0bcb0fb34d1",
"fundingData": {
"cardScheme": "MasterCard",
"expiryMonth": null,
"expiryYear": null,
"gatewayTokenId": "5fbd77ce-02c1-40ed-94bc-1016660b7512",
"providerResponse": {
"provider": "pxpfinancial",
"code": "00",
"emvDataResponse": {},
"paymentAccountReference": "637607302178175469",
"electronicCommerceIndicatorAdjustment": "05",
"merchantAdvice": {},
"authorisedAmount": 10,
"settlementDate": "2025-04-01T00:00:00"
},
"processorTransactionId": "403e7285-2993-4de4-b0ff-5e2f18bf7a8f"
}
}