Google Pay™


Google Pay™ is a payment wallet solution which allows users of Android devices to make seamless card backed payments. Support for Google Pay can help improve both conversion and your customer experience, and is rapidly becoming a leading payment option in the region.

Before you start,

Accepting Google Pay™ payments through your N-Genius Online account relies on a number of pre-requisites, which you must be able to satisfy:

  • A valid and enrolled Google Pay™ developer account (personal or organization)
  • An Andriod app integrated with N-Genius Online

You can integrate Google Pay™ with N-Genius by the following methods

  • Using the N-Genius Andriod SDK
  • Direct Api Integration

Configuring Google Pay™:

To start accepting payments from Google Pay™ users, follow these steps:

  1. Access the N-Genius Online Portal:

  • Log in to your N-Genius Online portal.
  • Navigate to Settings > Organisational Hierarchy.

  1. Locate Payment Channels:

  • In the Organizational Hierarchy screen, find the Payment Channels configuration option.
  1. Configure Google Pay™ Integration:

  • You will see various tabs representing different payment channels. Check how many are already configured.
  • Switch to the Wallets tab to set up your Google Pay integration.

  1. Generate Key Pair:

  • Generate your Private/Public keys by following the link.
  1. Upload the Public Key:

  • Access your Google Pay™ Business Account and upload the Public Key.
  • Upload the Private Key in the Google Pay™ Certificate section.

📘

Access the Google Pay Console:

Navigate to the Google Pay™ Console using the following link:

https://pay.google.com/business/console/payment/{{Merchant Id}}

Remember to replace {{Merchant Id}} with your actual merchant ID to access the console.



  1. Upload the Private Key on N-Genius:

  • In the N-Genius portal, click on Upload Private Key to upload your private key.
  1. Completion:

  • After uploading the private key, your Google Pay™ integration will be fully set up on your N-Genius Online account.

Integrating Google app in-app

There are two ways to setup and configure Google Pay™ in your Andriod app

  1. NGenius SDK - Use the sdk to quickly integrate Google Pay™. (Order types supported: "PURCHASE","AUTH","SALE")
  2. Direct API - You can directly integrate using the Google Pay™ and NGenius apis to get more control.

Google Pay (Direct API):

  1. Use TinkLibrary To Decrypt Received Response that you will get from Google.
  2. Extract pan , expirationMonth, expirationYear, cryptogram, and eciIndicator.
  3. Create the below object, to send it for the API.
{
  "primaryAccountNumber": "pan",
  "expiry": "expirationYear/expirationMonth",
  "eci": "eciIndicator",
  "cryptogram": "cryptogram"
}
  1. Create the order on Gateway
    Please refer the order creation API for creating an order on the gateway. Two stage payments

  2. Authorize the transaction on N-Genius

    • The order created should be authorised to obtain a paymentToken which is used to further post the Google Pay™ encrypted object to N-Genius and process the payment.
    • The authorization link can be obtained from the order response object. A sample key path is shown below to fetch the payment link
    {
      "_links": {
        "payment-authorization": {
          "href": "*https://payment-auth-link*"
        }
      }
    }
    
    

A payment token can be requested By making a POST request to the above link.

HTTP Method: POST

HeaderValue
Acceptapplication/vnd.ni-payment.v2+json
Media-Typeapplication/x-www-form-urlencoded
Content-Typeapplication/x-www-form-urlencoded

  1. Post the Google Pay™ encrypted object to N-Genius
    When the user selects a card from the Google Pay™ interface and authorizes a transaction, an encrypted object is received from Google which needs to be posted to N-Genius in order to process the transaction and charge the customer.

HTTP Method: PUT
Body data: object that you've created in the second step.

HeaderValue
AuthorizationBearer" + paymentToken
Content-Typeapplication/vnd.ni-payment.v2+json

In the above request header, payment token is the token that is received during the authorization step

The body data is the json that you’ve created on the second step.