Search Overlay

Google Pay

Google Pay provides customers with a frictionless and secure payment experience, enabling them to pay with their preferred payment method. By integrating Google Pay through the Paysafe Payments API, you can offer a fast, secure, and easy payment option to your customers.

Customers add payment cards to a Google Pay wallet, and the wallet securely stores the card information. When making a purchase, the customer selects Google Pay as their payment method and pays using a saved card, removing the need to repeatedly enter card details for each transaction.

Features

  • Convenient: customers can make payments using their saved cards in Google Pay, eliminating the need to manually enter card details.
  • Secure: the integration utilizes tokenization to protect sensitive card information during the payment process.
  • 3D Secure support: the payment handle created by the integration handle scenarios involves 3D Secure authentication, ensuring secure transactions.
  • Widely supported across multiple regions and currencies - see below:

Continent Currencies
North America SRD, MXN, NIO, BZD, CAD, USD
Europe CHF, SEK, NOK, RSD, RUB, RON, PLN, GBP, EUR, NOK, BGN, HRK, CZK, DKK
Africa YER, MAD, VUV, UZS, UYU, TZS, TND, SOS, SCR, SAR, RWF, NGN, NAD, MWK, MZN, MNT, LRD, AFN, DZD, BWP, XOF, BIF, CVE, KHR, XAF, CLP, XOF, GMD, GHS, GNF, XOF, GYD, HTG, HNL
Asia VND, UZS, AED, UAH, TRY, THB, TJS, TWD, KZT, KRW, KWD, BHD, ILS, INR, JPY, HKD, HUF, INR
Oceania AUD, NZD
South America BRL, BND, ARS, PYG, PAB
Central America CRC, GTQ, HNL

Transaction Types

We support the following transaction types:

  • Payments
  • Refunds

Setup Requirements

You need to onboard with Google Pay and Paysafe.

Google Pay onboarding and usage guidelines

Register with Google as a Google Pay merchant at https://pay.google.com/business/console/ and follow the steps to:

  • Get your Merchant ID.

  • Whitelist the domain.

  • Update supported card brands and images:

    {
    "allowedAuthMethods": ["PAN_ONLY", "CRYPTOGRAM_3DS"],
    "allowedCardNetworks": ["AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA"],
    "assuranceDetailsRequired": true
    }
  • Update payment provider information in the Google Business Console:

    • Set 'gateway' to Paysafe.
    • Set 'gatewayMerchantId' to your Paysafe Gateway Merchant ID - you can get this from the Paysafe Business Portal (see below).
    Getting GATEWAY_MERCHANT_ID from the Business Portal

    NOTE: In the above example, the GATEWAY_MERCHANT_ID is iGamingAutoPublicKey (under Username).

    const tokenizationSpecification = {
    type: 'PAYMENT_GATEWAY',
    parameters: {
    'gateway': 'paysafe',
    'gatewayMerchantId': GATEWAY_MERCHANT_ID
    }
    }

Google provides a unique Google Pay merchant ID which you need for production purposes.

The following links provide information on the correct usage of Google and Google Pay collateral in your products, including your apps, websites and marketing materials:

 

Paysafe onboarding

  1. Sign up with us to get your test accounts.
  2. Let us know what your Google Pay Merchant ID is by emailing Integration Support.
  3. Get your Paysafe API Keys from the Business Portal.

Google Pay Payments Flow Diagram

Typical Scenarios

Cryptogram 3DS and PAN Only

The payment flow is slightly different depending on whether it's a CRYPTOGRAM_3DS/PAN_ONLY without 3DS payment or a PAN_ONLY with 3DS Challenge payment, so it is important to understand CRYPTOGRAM_3DS and PAN_ONLY.

  • CRYPTOGRAM_3DS (3-Domain Secure) is a security protocol used in online payment transactions to authenticate the identity of the cardholder and protect against fraudulent activities.
  • CRYPTOGRAM_3DS is SCA compliant (Strong Customer Authentication).
  • PAN_ONLY is non-SCA compliant unless it is used with 3D Secure.
  • In regions where there is a mandate for SCA (3D Secure), PAN_ONLY should be used with the 3D Secure challenge.

Customer usage

Whether a card is available to a customer (and consequently to you and to Paysafe) as CRYPTOGRAM_3DS or as PAN_ONLY depends on the following conditions:

  • How the customer adds the card to Google Payment services ie:
    • Card added to the Google Pay app on an Android device - in this case, Google prepares two images of the card, a PAN_ONLY image and a CRYPTOGRAM_3DS image.
    • Card added to the Google Payment portal (https://pay.google.com/payments).
  • How the customer accesses your website and their Google Pay integration:
    • If the customer is using Chrome on their Android phone and there is a CRYPTOGRAM_3DS image for a card, the CRYPTOGRAM_3DS image is used.
    • If no CRYPTOGRAM_3DS image exists, the PAN_ONLY image is used.
    • If the customer is using a desktop device OR iPhone OR Android device with a non-Chrome browser, then the PAN_ONLY image is used.

  • For 3DS challenges, the Payment Handles API requires the cardholder's name. Where customers have previously registered with you, you can retrieve the cardholder name from the customer's profile and send to us for processing.

  • However, if the customer is not registered with you (shopping as a guest) and you would like to accept payment via Google Pay, you can retrieve the cardholder's name from an optional field "billingAddress.name" in the Google payload.

  • To enable 3DS flow for unregistered customers, you must set the optional parameter "billingAddressRequired" to "true" when configuring allowed payment methods during your Google integration.

    • Click here for Google's documentation on configuring permitted payment methods.
    • Click here for Google's documentation describing the supported card parameters, including "billingAddressRequired". 

       

const baseCardPaymentMethod = {
type: 'CARD',
parameters: {
allowedAuthMethods: allowedCardAuthMethods,
allowedCardNetworks: allowedCardNetworks,
billingAddressRequired: true
}
};

Google Pay payments

To process a payment request using Google Pay:

  1. Set up the Google Pay SDK in your UI, including important details described in the Google Pay Tutorial.

    The most important parameters in the SDK are:

    Parameter Description Values
    gateway Specifies which gateway to use for the integration. You can have multiple integration gateways with the same google account. 'paysafe' only
    gatewayMerchantId Your Paysafe Merchant ID - you can get this from the Paysafe Business Portal or by emailing integration support. Unique for each merchant account
    allowedAuthMethods Specifies which card images Google Pay should send in the response.
    • PAN_ONLY: This authentication method is associated with payment cards stored on file with the customer's Google Account. Returned payment data includes personal account number (PAN) with the expiration month and the expiration year.
    • CRYPTOGRAM_3DS: This authentication method is associated with cards stored as Android device tokens. Returned payment data includes a 3D Secure (3DS) cryptogram generated on the device.
    allowedCardNetworks Specifies which card networks to make available for the transaction. AMEX, DISCOVER, INTERAC, JCB, MASTERCARD, VISA etc
    const tokenizationSpecification = {
    type: 'PAYMENT_GATEWAY',
    parameters: {
    'gateway': 'paysafe',
    'gatewayMerchantId': PAYSAFE_GATEWAY_MERCHANT_ID
    }
    };

    const baseCardPaymentMethod = {
    type: 'CARD',
    parameters: {
    allowedAuthMethods: ["PAN_ONLY", "CRYPTOGRAM_3DS"],
    allowedCardNetworks: ["AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA"],
    }
    };
  2. For CRYPTOGRAM_3DS and PAN_ONLY without 3DS payments use:
    allowedAuthMethods: ["PAN_ONLY", "CRYPTOGRAM_3DS"],

    For PAN_ONLY with 3DS Challenge payments use:
    allowedAuthMethods: ["PAN_ONLY"],

  3. If the configuration details are correct, the SDK displays the Google Pay button:
    G Pay button

    Note that you can customize the button according to your use case.

  4. The customer clicks on the Google Pay button, logs in to their Google account and pays using a saved card.

    Google Pay test environment

  5. Following authorization by the customer, the SDK function returns an object containing a signature and encrypted data.

  6. Create a payment handle with the following parameter settings:
    transactionType: PAYMENT
    paymentType: CARD

    POST: paymenthub/v1/singleusepaymenthandles

    Pass the response from the Google Pay SDK and the tokenized card in the googlePay object of the payment handle request.

  7. For CRYPTOGRAM_3DS and PAN_ONLY without 3DS payments, we return a response with a payment handle status of PAYABLE - you will be notified of this status change via your configured webhooks.

  8. For PAN_ONLY with 3DS Challenge payments, we return a payment handle response with the following details:

    • The action parameter set to REDIRECT.
    • redirect_payment link pointing to the 3DS Challenge Page redirect URL, which could be opened in an iFrame, web-eview, or new browser tab.
    • A payment handle status of INITIATED.

    Depending on the outcome of the 3DS challenge, the customer is redirected to either your success or failed page.

    While the customer is completing the 3DS challenge, the status of the payment handle changes to PROCESSING, then changes to PAYABLE if the challenge is successful, or FAILED if it is unsuccessful - you will be notified of these status changes via your configured webhooks.

  9. Use the paymentHandleToken returned in the response to process the payment request:
    POST: paymenthub/v1/payments

    NOTE:

    • If settleWithAuth is TRUE, the id returned in the payment response is the payment ID, which is the same as the settlement ID. In this case, you should store the payment ID as it is needed to process refunds.
    • If settleWithAuth is FALSE, you call the Settlements API separately:
      POST: paymenthub/v1/settlements
      The id returned in the settlement response is the settlement ID, which is different to the payment ID. In this case, you should store the settlement ID in order to process refunds.

Google Pay refunds

To process a refund transaction using Google Pay:

  1. Make sure the initial payment has a status of COMPLETED - you can only initiate a refund for a transaction where Settlement/Payment is completed.
  2. Create a refund request using the settlement ID (if settleWithAuth is TRUE, this is also the payment ID):
    POST: /paymenthub/v1/settlements/{settlementId}/refunds
    NOTE:
    • The refund amount can be equal to the initial payment, or lower if you want to make a partial refund.
    • If required, you can initiate multiple partial refunds until the total refund amount is less than or equal to the initial payment amount.
  3. We return a refund response containing details of the completed payment and a unique identifier for referring to each individual refund (partial or full).
    The status of the refund changes from PENDING to COMPLETED when the refund is processed - you will be notified of all status changes via your configured webhooks.

APIs to use

Code Examples

Google Pay SDK response

{
"apiVersion": 2,
"apiVersionMinor": 0,
"paymentMethodData": {
"type": "CARD",
"description": "MasterCard **** 1021",
"info": {
"cardNetwork": "MASTERCARD",
"cardDetails": "1021"
},
"tokenizationData": {
"type": "PAYMENT_GATEWAY",
"token": "{\"signature\":\"MEUCIDdM/9XgHvvioyAYKouRbf1t26nyqiwK/CdKO3sSBtzSAiEA5UHNt1NC5Xc6jujkEixxJqhPMtSuezMv1slpX2xKq/w=\",\"protocolVersion\":\"ECv1\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"qqH+0U9L/B2vmWj8BTbLtyvH99x21M8Rk3q2xMsX4ceBZdv5qrcB5dYgjDYNqh1YmdoHAX1n6ExcKXf6KyvxLS0TJnjj0qM4adS7oeCEOqEtuDnXLjbwRpYZPALpNQngnObr5ul4A/tHHJd2otmx+cHx/GOk9fL/H/A4D3uG/MPzJlmQ2FDFAlhTSBBQVCWYEorLqGna74OQn/h7knfuR3OXV41NKGM7t0SKgIvQSrhN4Q7P5L2vF7LwOW2kYpDWKEfFF2vTq996BuKxvfuQidi+rJewMIhetZv4YFvOWP2K0wwbRyH08V5m\\\",\\\"ephemeralPublicKey\\\":\\\"BMM7dbNa4xkaNaMxLHyd16vbB4ehJOrNTv4+5JSThp9F8dsYxdNbKwzy2zXOPjUXaHj4Y2WCpoaLNit7iuOSFG0=\\\",\\\"tag\\\":\\\"bq0VEaABWqgT1yjhhRHTbrI3k9Ru85ZNi+Vu1UFLKoc=\\\"}\"}"
}
},
"shippingAddress": {
"name": "John Doe",
"address1": "c/o Google LLC",
"address2": "1600 Amphitheatre Pkwy",
"address3": "Building 40",
"locality": "Mountain View",
"administrativeArea": "CA",
"countryCode": "US",
"postalCode": "94043",
"sortingCode": ""
}
}

Payment Handle with 3DS Payments API Request

{
"merchantRefNum": "90e79ab4-ae53-4e5e-9888-e1b298bbc7a1",
"accountId": "1009688230",
"transactionType": "PAYMENT",
"threeDsVersion": "THREE_D_S_TWO",
"deviceFingerprinting": {
"threatMetrixSessionId": "92d03577-6776-459a-8652-1515dab6c6f2"
},
"threeDs": {
"deviceChannel": "BROWSER",
"merchantUrl": "https://api.qa.paysafe.com/checkout/v2/demo-store/index.html",
"authenticationPurpose": "PAYMENT_TRANSACTION",
"messageCategory": "PAYMENT"
},
"googlePay": {
"googlePayPaymentToken": {
"apiVersion": 2,
"apiVersionMinor": 0,
"paymentMethodData": {
"type": "CARD",
"description": "MasterCard **** 1021",
"info": {
"cardNetwork": "MASTERCARD",
"cardDetails": "1021"
},
"tokenizationData": {
"type": "PAYMENT_GATEWAY",
"token": "{\"signature\":\"MEQCIH/d6QDdwmliSRN0ezO0nbOGQH8l3XGh6gxb1+WtFXdBAiBAWeqarVpUTcuERiIhKCGikxhvzY1u+uU0UA5tZzGD9A==\",\"protocolVersion\":\"ECv1\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"dbnDrx7lj+RQYemuT1C0J5WrMNTkgqrv7XLTS8EaYGu2IZoXDaJ0dD3iGzUqmECPHO2aAMNmuLtQ31b7NPnLpR8Go8jwgft3qBQ62GeVRKijiLA8DNH00tURUvhRwmEG7oP2nPrMwz417vDIjcBFhxJJFPDt7g9MmeoHsHPrd/br4LPL9cjediuVATAj1Lzs041KIaKalbqtWEYCGwW9iAZzKiEGZ8xduXKyAdpozcrwlD23fUuoo6XZz2nZ/lrztmTRni/XguYkFXl2Ihi3KdB/xv61Wymu7Nwgeq+DRe1X5lKuNFvF+vif\\\",\\\"ephemeralPublicKey\\\":\\\"BKvtSWzPZ2zOSR0KaK+dgdIIlNYgfb6Yk7nVFXDDSs2oMFUKHeH4zEyMHE8Z82zw4S4MEM/NNAKOpWD+7I3Tvqc=\\\",\\\"tag\\\":\\\"isffeZ1a3bZ6UbTyHTrKoI6VB5lU7lsf/n6jeLK17NE=\\\"}\"}"
}
},
"shippingAddress": {
"name": "John Doe",
"address1": "c/o Google LLC",
"address2": "1600 Amphitheatre Pkwy",
"address3": "Building 40",
"locality": "Mountain View",
"administrativeArea": "CA",
"countryCode": "US",
"postalCode": "94043",
"sortingCode": ""
}
}
},
"paymentType": "CARD",
"amount": 100,
"currencyCode": "USD",
"customerIp": "172.0.0.1",
"billingDetails": {
"nickName": "Home",
"street": "steet1",
"city": "Evalynton",
"state": "CA",
"country": "US",
"zip": "94404"
},
"merchantDescriptor": {
"dynamicDescriptor": "OnlineStoreeeeeeeee",
"phone": "1234567899"
},
"returnLinks": [
{
"rel": "default",
"href": "https://usgaminggamblig.com/payment/return/",
"method": "GET"
},
{
"rel": "on_completed",
"href": "https://usgaminggamblig.com/payment/return/success",
"method": "GET"
},
{
"rel": "on_failed",
"href": "https://usgaminggamblig.com/payment/return/failed",
"method": "GET"
}
]
}

Payment Handle with 3DS Payments API Response

{
"id": "0322fe58-60d8-468f-80cb-6e0e8fa2a857",
"accountId": "1009688230",
"paymentType": "CARD",
"paymentHandleToken": "GRTEwzMYiqBQEHg",
"status": "INITIATED",
"merchantRefNum": "2eea4d74-b74a-4c8c-a638-383de9bad45b",
"currencyCode": "USD",
"txnTime": "2023-02-21T16:56:04Z",
"billingDetails": {
"nickName": "Home",
"street": "steet1",
"city": "Silasberg",
"zip": "94404",
"state": "CA",
"country": "US"
},
"customerIp": "172.0.0.1",
"links": [
{
"method": "GET",
"rel": "redirect_payment",
"href": "https://api.qa.paysafe.com/cardadapter/v1/authentication/app/index.html?id=3461075c-0e6e-4260-92e4-a572edfe40f3"
}
],
"amount": 500,
"action": "REDIRECT",
"usage": "SINGLE_USE",
"timeToLiveSeconds": 299,
"transactionType": "PAYMENT",
"executionMode": "SYNCHRONOUS",
"card": {
"status": "ACTIVE",
"cardType": "MC",
"cardBin": "520000",
"lastDigits": "1021",
"cardCategory": "CREDIT"
},
"googlePay": {
"googlePayPaymentToken": {
"paymentMethodData": {
"description": "MasterCard **** 1021",
"type": "CARD",
"info": {
"cardNetwork": "MASTERCARD",
"cardDetails": "1021"
}
},
"shippingAddress": {
"address3": "Building 40",
"address2": "1600 Amphitheatre Pkwy",
"countryCode": "US",
"address1": "c/o Google LLC",
"postalCode": "94043",
"name": "John Doe",
"locality": "Mountain View",
"administrativeArea": "CA"
},
"ephemeralPublicKey": "BChJioDarJOrMBfyJwOtyMm7sDlwHxESsy31MgryWu6KuF3ft4hvTNSKKrtCMq6OV1bpZYWs6I8lIcXfRiUW6P4=",
"tag": "r1TXTNtDRiO4HmRJEpfx0S8eNwtyrbDjJYK4HQDVoeM=",
"paymentMethod": "CARD_ON_FILE",
"messageId": "bf7b45ec-d345-4869-beb6-9b70c9a38ade",
"messageExpiration": "1676998636591"
}
},
"merchantDescriptor": {
"dynamicDescriptor": "OnlineStoreeeeeeeee",
"phone": "1234567899"
},
"returnLinks": [
{
"method": "GET",
"rel": "default",
"href": "https://usgaminggamblig.com/payment/return/"
},
{
"method": "GET",
"rel": "on_completed",
"href": "https://usgaminggamblig.com/payment/return/success"
},
{
"method": "GET",
"rel": "on_failed",
"href": "https://usgaminggamblig.com/payment/return/failed"
}
],
"deviceFingerprinting": {
"threatMetrixSessionId": "92d03577-6776-459a-8652-1515dab6c6f2"
},
"skip3ds": false,
"threeDs": {
"merchantUrl": "https://api.qa.paysafe.com/checkout/v2/demo-store/index.html",
"deviceChannel": "BROWSER",
"messageCategory": "PAYMENT",
"authenticationPurpose": "PAYMENT_TRANSACTION"
}
}

Payment Handle without 3DS Payments API Request

{
"merchantRefNum": "90e79ab4-ae53-4e5e-9888-e1b298bbc7a1",
"accountId": "1009688230",
"transactionType": "PAYMENT",
"googlePay": {
"googlePayPaymentToken": {
"apiVersion": 2,
"apiVersionMinor": 0,
"paymentMethodData": {
"type": "CARD",
"description": "MasterCard **** 1021",
"info": {
"cardNetwork": "MASTERCARD",
"cardDetails": "1021"
},
"tokenizationData": {
"type": "PAYMENT_GATEWAY",
"token": "{\"signature\":\"MEQCIH/d6QDdwmliSRN0ezO0nbOGQH8l3XGh6gxb1+WtFXdBAiBAWeqarVpUTcuERiIhKCGikxhvzY1u+uU0UA5tZzGD9A==\",\"protocolVersion\":\"ECv1\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"dbnDrx7lj+RQYemuT1C0J5WrMNTkgqrv7XLTS8EaYGu2IZoXDaJ0dD3iGzUqmECPHO2aAMNmuLtQ31b7NPnLpR8Go8jwgft3qBQ62GeVRKijiLA8DNH00tURUvhRwmEG7oP2nPrMwz417vDIjcBFhxJJFPDt7g9MmeoHsHPrd/br4LPL9cjediuVATAj1Lzs041KIaKalbqtWEYCGwW9iAZzKiEGZ8xduXKyAdpozcrwlD23fUuoo6XZz2nZ/lrztmTRni/XguYkFXl2Ihi3KdB/xv61Wymu7Nwgeq+DRe1X5lKuNFvF+vif\\\",\\\"ephemeralPublicKey\\\":\\\"BKvtSWzPZ2zOSR0KaK+dgdIIlNYgfb6Yk7nVFXDDSs2oMFUKHeH4zEyMHE8Z82zw4S4MEM/NNAKOpWD+7I3Tvqc=\\\",\\\"tag\\\":\\\"isffeZ1a3bZ6UbTyHTrKoI6VB5lU7lsf/n6jeLK17NE=\\\"}\"}"
}
},
"shippingAddress": {
"name": "John Doe",
"address1": "c/o Google LLC",
"address2": "1600 Amphitheatre Pkwy",
"address3": "Building 40",
"locality": "Mountain View",
"administrativeArea": "CA",
"countryCode": "US",
"postalCode": "94043",
"sortingCode": ""
}
}
},
"paymentType": "CARD",
"amount": 100,
"currencyCode": "USD",
"customerIp": "172.0.0.1",
"billingDetails": {
"nickName": "Home",
"street": "steet1",
"city": "Evalynton",
"state": "CA",
"country": "US",
"zip": "94404"
},
"merchantDescriptor": {
"dynamicDescriptor": "OnlineStoreeeeeeeee",
"phone": "1234567899"
},
"returnLinks": [
{
"rel": "default",
"href": "https://usgaminggamblig.com/payment/return/",
"method": "GET"
},
{
"rel": "on_completed",
"href": "https://usgaminggamblig.com/payment/return/success",
"method": "GET"
},
{
"rel": "on_failed",
"href": "https://usgaminggamblig.com/payment/return/failed",
"method": "GET"
}
]
}

Payment Handle without 3DS Payments API Response

{
"id": "0322fe58-60d8-468f-80cb-6e0e8fa2a857",
"accountId": "1009688230",
"paymentType": "CARD",
"paymentHandleToken": "GRTEwzMYiqBQEHg",
"merchantRefNum": "2eea4d74-b74a-4c8c-a638-383de9bad45b",
"currencyCode": "USD",
"txnTime": "2023-02-21T16:56:04Z",
"billingDetails": {
"nickName": "Home",
"street": "steet1",
"city": "Silasberg",
"zip": "94404",
"state": "CA",
"country": "US"
},
"customerIp": "172.0.0.1",
"status": "PAYABLE",
"amount": 1,
"action": "NONE",
"usage": "SINGLE_USE",
"timeToLiveSeconds": 899,
"transactionType": "PAYMENT",
"executionMode": "SYNCHRONOUS",
"card": {
"status": "ACTIVE",
"cardType": "MC",
"cardBin": "520000",
"lastDigits": "1021",
"cardCategory": "CREDIT"
},
"googlePay": {
"googlePayPaymentToken": {
"paymentMethodData": {
"description": "MasterCard **** 1021",
"type": "CARD",
"info": {
"cardNetwork": "MASTERCARD",
"cardDetails": "1021"
}
},
"shippingAddress": {
"address3": "Building 40",
"address2": "1600 Amphitheatre Pkwy",
"countryCode": "US",
"address1": "c/o Google LLC",
"postalCode": "94043",
"name": "John Doe",
"locality": "Mountain View",
"administrativeArea": "CA"
},
"ephemeralPublicKey": "BChJioDarJOrMBfyJwOtyMm7sDlwHxESsy31MgryWu6KuF3ft4hvTNSKKrtCMq6OV1bpZYWs6I8lIcXfRiUW6P4=",
"tag": "r1TXTNtDRiO4HmRJEpfx0S8eNwtyrbDjJYK4HQDVoeM=",
"paymentMethod": "CARD_ON_FILE",
"messageId": "bf7b45ec-d345-4869-beb6-9b70c9a38ade",
"messageExpiration": "1676998636591"
}
},
"merchantDescriptor": {
"dynamicDescriptor": "OnlineStoreeeeeeeee",
"phone": "1234567899"
},
"returnLinks": [
{
"method": "GET",
"rel": "default",
"href": "https://usgaminggamblig.com/payment/return/"
},
{
"method": "GET",
"rel": "on_completed",
"href": "https://usgaminggamblig.com/payment/return/success"
},
{
"method": "GET",
"rel": "on_failed",
"href": "https://usgaminggamblig.com/payment/return/failed"
}
],
"deviceFingerprinting": {
"threatMetrixSessionId": "92d03577-6776-459a-8652-1515dab6c6f2"
},
"skip3ds": false,
"threeDs": {
"merchantUrl": "https://api.qa.paysafe.com/checkout/v2/demo-store/index.html",
"deviceChannel": "BROWSER",
"messageCategory": "PAYMENT",
"authenticationPurpose": "PAYMENT_TRANSACTION"
}
}

Payment request

{
"merchantRefNum": "e8f244f277376b4ac718",
"amount": 1,
"currencyCode": "USD",
"dupCheck": true,
"settleWithAuth": true,
"paymentHandleToken": "GRTEwzMYiqBQEHg",
"customerIp": "172.0.0.1",
"description": "Magazine subscription"
}

Payment response

{
"id": "bd015cf0-08db-4423-88e0-32deac4ad085",
"paymentType": "CARD",
"paymentHandleToken": "GRTEwzMYiqBQEHg",
"merchantRefNum": "e8f244f277376b4ac718",
"currencyCode": "USD",
"settleWithAuth": true,
"txnTime": "2023-02-21T16:56:14Z",
"billingDetails": {
"nickName": "Home",
"street": "steet1",
"city": "Silasberg",
"zip": "94404",
"state": "CA",
"country": "US"
},
"customerIp": "172.0.0.1",
"status": "COMPLETED",
"amount": 1,
"preAuth": false,
"description": "Magazine subscription",
"availableToSettle": 0,
"gatewayResponse": {
"code": "VPS",
"responseCode": "00",
"avsCode": "X",
"authCode": "376717",
"avsResponse": "NOT_PROCESSED",
"cvvVerification": "NOT_PROCESSED",
"serializable": true
},
"merchantDescriptor": {
"dynamicDescriptor": "OnlineStoreeeeeeeee",
"phone": "1234567899"
},
"settlements": [
{
"merchantRefNum": "e8f244f277376b4ac718",
"amount": 1,
"id": "bd015cf0-08db-4423-88e0-32deac4ad085",
"availableToRefund": 1,
"txnTime": 1676998574000,
"status": "PENDING"
}
],
"card": {
"cardExpiry": {
"month": "12",
"year": "2023"
},
"status": "ACTIVE",
"cardType": "MC",
"cardBin": "520000",
"lastDigits": "1021",
"cardCategory": "CREDIT"
}
}

Webhooks

You can trigger the following webhooks for Google Pay:

Payment Handle webhooks

Webhook Description
PAYMENT_HANDLE_PAYABLE The payment handle token has been successfully created and can be used for the next API call when the preliminary requirements are completed.
PAYMENT_HANDLE_PROCESSING The customer was successfully redirected to the payment platform's page and has started the payment process.
PAYMENT_HANDLE_COMPLETED The payment handle process was completed and the next API call has been initiated.
PAYMENT_HANDLE_EXPIRED The next step was not initiated within the specified time frame (timeToLiveSeconds) after the payment handle was created.
NOTE: timeToLiveSeconds is returned in the payment handle response and represents the number of seconds the paymentHandleToken is valid before expiration.
PAYMENT_HANDLE_FAILED

Triggered in multiple cases:

  • The input data is incorrect.
  • The 3DS challenge failed.
  • The transaction was declined by any entity such as Google Pay, the acquirer or the issuer.

Payments webhooks

Webhook Description
PAYMENT_PROCESSING The payment is in progress. In some cases, delays can occur due to pending actions by either the customer or by you.
PAYMENT_PENDING The payment is pending because the transaction hasn't yet completed from any intermediate status.
PAYMENT_COMPLETED/
SETTLEMENT_COMPLETED
The payment was completed successfully. 
PAYMENT_FAILED The payment failed during the payment process.

Settlement webhooks

Webhook Description
SETTLEMENT_FAILED The transaction was initially completed but later failed due to a settlement error.
SETTLEMENT_CANCELLED The transaction was cancelled after it was completed.
SETTLEMENT_ERRORED A technical error occurred during initiation of the transaction.
SETTLEMENT_PENDING The settlement has been initiated but due to various bank delays or time zone issues the actual money transfer has not yet happened.

Refund webhooks

Webhook Description
REFUND_FAILED The refund was initiated but failed due to a functional error. For example, the refund amount was more than the payment amount.
REFUND_COMPLETED The refund was successfully transferred from your merchant account to the customer's chosen bank account.
REFUND_PENDING The refund has been initiated but due to various bank delays or time zone issues the actual money transfer has not yet happened.

Test and Go Live