Skip to content

Google Pay transaction

Process an online transaction using Google Pay.

Overview

To accept Google Pay, you must decrypt the payment token on your backend before submitting the transaction.

The flow is:

  1. Collect the payment token from the Google Pay sheet on the client device.
  2. Decrypt the token using POST /v1/wallets/GooglePay/decrypt-token.
  3. Submit the decrypted card details using the card-not-present card type with walletType set to GooglePay.

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.

Initiate a Google Pay transaction

POST
/v1/transactions

Request example

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"
  }
}
ParameterDescription
merchant
string (≤ 20 characters)
required
Your unique merchant identifier, as assigned by PXP.
site
string (≤ 20 characters)
required
Your unique site identifier, as assigned by PXP.
merchantTransactionId
string (≤ 50 characters)
required
A unique identifier for this transaction.
merchantTransactionGroupId
string (≤ 50 characters)
A unique identifier for grouping related transactions. Only valid when transactionMethod.entryType is Ecom.
merchantTransactionDate
date-time
required
The date and time when the transaction happened, in ISO 8601 format.
transactionMethod
object
required
Details about the transaction method.
transactionMethod.entryType
string
required
The entry type. For e-commerce transactions, this is always Ecom.
transactionMethod.fundingType
string
required
The funding type. For card transactions, this is always Card.
transactionMethod.intent
string
required
The payment intent. Learn more about intents.

Possible values:
  • Authorisation
  • EstimatedAuthorisation
  • Purchase
  • Payout
  • Refund
amounts
object
required
Details about the transaction amount.
amounts.transaction
number
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.currencyCode
string (1-3 characters)
required
The currency code associated with the transaction, in ISO 4217 format.
fundingData
object
required
Details about the payment method used for the transaction.
fundingData.card
object
required
Card not present details for a decrypted Google Pay token. Set walletType to GooglePay.
fundingData.card.primaryAccountNumber
string (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.expiryMonth
string (2 characters)
The expiry month (MM) of the card. Map from paymentMethodDetails.expirationMonth in the decrypt response.
fundingData.card.expiryYear
string (4 characters)
The expiry year (YYYY) of the card. Map from paymentMethodDetails.expirationYear in the decrypt response.
fundingData.card.holderName
string (≤ 50 characters)
The full name of the individual who owns the payment card.
fundingData.card.walletType
string
required
The digital wallet used for this card not present transaction. Set to GooglePay when submitting decrypted Google Pay card details.
threeDSecureData
object
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.dynamicDescriptors
object
Optional merchant-defined descriptors that appear on the cardholder's statement. Learn more about dynamic descriptors.
fundingData.card.dynamicDescriptors.cardAcceptorName
string (≤ 22 characters)
A description of the transaction that will appear on the cardholder's statement.
shopper
object
Details about the shopper making the payment.

Response example

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"
  }
}