---
updatedAt: 2026-02-26T13:08:27.000Z
agentTools:
  projectIndex: https://docs.ngenius-payments.com/llms.txt
---

# Google Pay – Direct API Integration

This guide explains how to integrate Google Pay directly using the N-Genius **Direct API**.

The N-Genius Android SDK supports **Google Pay** starting from **v4.0.5**.\
This guide explains how to enable Google Pay in your app, migrate from older methods, and correctly map the required URLs for a successful transaction.

***

## Prerequisites

* Download the latest Android SDK (v4.0.5 or higher):\
  [N-Genius Payment SDK for Android](https://github.com/network-international/payment-sdk-android)

* Ensure Google Pay has been enabled for your merchant account by contacting your **Relationship Manager** or the **Support team**.

***

## Migration Note

If you are currently using the `PaymentClient.launchCardPayment()` method, note that it has been **deprecated**.

You must migrate to the `PaymentsLauncher.launch()` method, which now supports Google Pay by requiring an additional configuration parameter.

***

## Integration Steps

1. **Use SDK v4.0.5 or higher** (older versions do not support Google Pay).

2. **Define GooglePayConfig**:\
   Google Pay requires two parameters:

   * **environment** → `Test` or `Production`.
   * **merchantGatewayId** → provided by Google Pay when registering your account.

```kotlin
val googlePayConfig = GooglePayConfig(
    environment = GooglePayConfig.Environment.Production,
    merchantGatewayId = "BCR2DN4T27NJW2Y"

```

3. **Launch the Payment Request**:\
   Pass the **authorization URL**, **payPageUrl**, and **GooglePayConfig** into the `PaymentsRequest` builder.

```kotlin
paymentsLauncher.launch(
    PaymentsRequest.builder()
        .gatewayAuthorizationUrl(authUrl)
        .payPageUrl(payPageUrl)
        .setGooglePayConfig(googlePayConfig)
        .build()
)
```

## Order Creation & URL Mapping

When integrating with the SDK, you must first **create an order**.\
The response will return the URLs required by the SDK:

* **authUrl** → maps to the `payment-authorization` object:

```json
"payment-authorization": {
    "href": "https://api-gateway-sandbox.platform.network.ae/transactions/paymentAuthorization"
}
```

* **payPageUrl** → maps to the `payment` object:

```json
"payment": {
    "href": "https://paypage-sandbox.platform.network.ae/?code=84553269c3a5bb75"
}
```

Use these values to populate the arguments in the `PaymentsRequest` object.

## Certificate Upload

To complete your integration:

* Upload your **signed Google Pay certificate** to the \**[N-Genius Portal\*](https://portal.sandbox.ngenius-payments.com/)*.
* Certificates can be uploaded via the portal UI or using the API.

Once configured, a **“Buy with GPay”** button will appear on your payment screen.

## Testing the Flow

* When users tap **“Buy with GPay”**, the Google Pay sheet will appear.
* Users may be prompted to sign in with Gmail.
* Once confirmed, the payment flow will continue as expected.

Always test thoroughly in **sandbox** before going live.

## Conclusion

By following these steps, you can integrate Google Pay seamlessly using the N-Genius Android SDK v4.0.5.\
Ensure that your **order creation flow correctly maps the authUrl and payPageUrl**, and that your Google Pay configuration is properly set up with the required credentials.

This guarantees a smooth and secure Google Pay checkout experience for your users.

## References

* [Android SDK Developer Guide](https://docs.ngenius-payments.com/reference/andriod-sdk)
* [Google Pay API Web Integration Guide. ](https://docs.ngenius-payments.com/reference/google-pay-api-web-integration-guide)
* [N-Genius Payment SDK for Android (GitHub)](https://github.com/network-international/payment-sdk-android)
* [Sample App – MainActivity.kt](https://github.com/network-international/payment-sdk-android/blob/master/app/src/main/java/payment/sdk/android/demo/MainActivity.kt)
* [Google Pay – Cryptography Guide](https://developers.google.com/pay/api/android/guides/resources/payment-data-cryptography#using-openssl)