> ## Documentation Index
> Fetch the complete documentation index at: https://developers.epayclub.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Pay

> Collect payments from Google Pay wallets.

Accept payments from customers using Google Pay, the digital wallet available on Android devices and the Chrome browser. Customers authenticate the charge through Google's secure payment sheet — no card details are entered manually.

<Info>
  This payment method only supports one-time (non-recurring) payments. It is available on Android devices and in the Chrome browser on any platform where Google Pay is set up.
</Info>

## Payment flow

Several steps occur between collecting the customer's billing information and completing the charge.

<Info>
  We'll proceed assuming you've already set up a customer order. If you need to create one, you'll find the steps [here](/orders/create-orders).
</Info>

After creating the order, follow these steps to complete the Google Pay charge.

1. [Collect](#google-pay-customer-information) the customer's billing information.
2. [Encrypt](/api-basics/encryption) sensitive data within your request.
3. Redirect the customer to the Google Pay checkout page to authorise the charge.
4. Confirm the payment and inform the customer of its outcome.

### Google Pay Customer Information

Present the customer with a form to gather their billing details. These are required to initiate the transaction:

| Customer information | Parameter                          | Example           | Required |
| :------------------- | :--------------------------------- | :---------------- | :------- |
| Country              | `country`                          | US                | Yes      |
| Customer Name        | `card.billingAddress.customerName` | John Smith        | Yes      |
| House Number         | `card.billingAddress.HouseNumber`  | 1600              | Yes      |
| Street               | `card.billingAddress.street`       | Amphitheatre Pkwy | Yes      |
| City                 | `card.billingAddress.city`         | Mountain View     | Yes      |
| State                | `card.billingAddress.state`        | California        | Yes      |
| Country              | `card.billingAddress.country`      | US                | Yes      |
| Zip code             | `card.billingAddress.zipCode`      | 94043             | Yes      |
| Phone Number         | `card.billingAddress.PhoneNumber`  | +16505551234      | Yes      |

Combine the billing data, order reference, and `paymentoption`. Encrypt the request before sending it to the pay order [endpoint](/api-reference/orders/pay).

<CodeGroup>
  ```json Example (Unencrypted) theme={null}
  {
      "reference": "12345678",
      "paymentoption": "GOOGLEPAY",
      "country": "US",
      "card": {
          "billingAddress": {
              "customerName": "John Smith",
              "HouseNumber": "1600",
              "street": "Amphitheatre Pkwy",
              "city": "Mountain View",
              "state": "California",
              "country": "US",
              "zipCode": "94043",
              "PhoneNumber": "+16505551234"
          }
      }
  }
  ```

  ```json Example (Encrypted) theme={null}
  {
    "data": "B9pQJ1HoxybgfjNnEro+26w7lQZ6jriF3AFiUeGH2Ggacn6cF0srUlqiHEXeEncJcMw6ThDobjuS+AsmvhNfvGPGMddjbt5rcK2JrUnUI4cHk0XebJKoNnjEqivcyq0UKEMdYOLd6mYZtvKu5FMlpz0Lo0aMY49pnYvUGLSsCf/wOhlPx9PHgQDXptT+WBJcO3lzeD8O0S4IVSWPCWPLi7GhGlqhZpheEi1FHq39TCHk12hL3sqkkIktZIkkQVAe8AkwZGhy/CMJZrTzU6IXZr2ulT7mJenZljSk66m0pARcUqwMw/+5PEPECDo8SX3IkX2hmym02pGuWZeHE9ONWcaW7h8UIroQ/+kThz/RtP/UMiK3596cij66JcW+RcXKPiqNKysskcnaOlQFIFuhEiAczimLgd320RrQzehaw1C33UGsCzAG1p2EnDthjTF63BZtEhVlu9kN7qtFCz9AvojZeaZFKOxpJJ0usfwl9Hq5oAa56AFt/3IIsvqrAktTOyMgQ/jGQ6uhRYpA6UAH0CcYyv7L99hgVtRTXAxA/rpCtY7aTR9Pjxb5Lt1IV0Q1V8fWxAv0yY+ss07qeiSIsccsdJiN4LaMx3RvmDlu54XF68w51L34hOCDj/NBoPVUZrSaCJK2GPJ6CjOHI8q2/U2TkU+y+a80XCAC/rgqGhw="
  }
  ```
</CodeGroup>

Upon receiving your request, we will return a successful response containing a redirect URL for the Google Pay checkout page.

```json 200 OK [expandable] theme={null}
{
    "data": {
        "paymentDetail": {
            "redirectUrl": "https://path/to/google/pay/checkout?ref=EPCLB-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "recipientAccount": null,
            "paymentReference": "CP2C4G375D-9EC2-58D2-B61F-7605GC038E62"
        },
        "bankTransferDetails": null,
        "orderPayment": {
            "orderId": 630,
            "orderPaymentReference": "PGW-PAYREF-E2D3B1C1F43C5G76CCDCBF01H345H644",
            "currency": "USD",
            "statusId": 2,
            "orderPaymentResponseCode": "02",
            "orderPaymentResponseMessage": "pending-authentication",
            "orderPaymentInstrument": null,
            "remarks": "Order payment initiated",
            "totalAmount": 100.00,
            "fee": 0.00
        }
    },
    "status": "success",
    "statusCode": "02",
    "message": "pending-authentication"
}
```

### Authorising the Payment

Redirect the customer to the `paymentDetail.redirectUrl`. On this page, the customer is presented with the Google Pay payment sheet, where they select their preferred payment method and confirm the charge.

Once the customer approves, Google Pay processes the transaction and EPayClub is notified of the outcome. You will receive a webhook containing the final transaction status regardless of whether the payment was approved or declined.

### Verifying the Payment

<Info>
  [Read](/orders/verify-orders) the transaction verification section to learn how to verify your Google Pay transactions.
</Info>

## Testing your integration

<Warning>
  Kindly [contact](mailto:support@epayclub.com) the support team to enable Google Pay testing on your account.
</Warning>

Follow these guidelines to successfully test your Google Pay integration:

1. Use a device or browser with Google Pay configured and a test card added to the wallet.
2. Ensure the billing address details match the country of the test card.
3. Use test credentials provided by the support team to complete the payment on the hosted page.
4. Verify the final transaction status using the [order verification](/orders/verify-orders) endpoint or by checking the webhook payload delivered to your configured webhook URL.
