# Introduction

Welcome to the documentation for integrating Google Pay™ with Callphone. This guide will walk you through the necessary steps for you to process Google Pay™ transactions seamlessly from your mobile application.

### Supported Card Networks

We currently support the following card schemes:

* Verve
* Visa
* MasterCard

We support 3DS and pin authentication for local cards. For international cards, 3DS will be coming soon.&#x20;

We support 3DS, no auth and pin authentication. The merchant needs to be PCI-DSS compliant to support no auth.


# Prerequisites

Before integrating Google Pay™ with Callphone, ensure that you have the following prerequisites:

* A merchant account on Google Pay™
* A merchant account with Callphone (Contact the [Callphone business team](/onboarding) for this).
* Access to the Google Pay™ API/SDK.
* A functional backend server to handle payment requests.


# Step 1: Set Up Google Pay™ Integration

* Our gatewayID is "airvend".
* A unique Gateway Merchant ID (gatewayMerchantID) will be assigned to the merchant after proper onboarding.
* &#x20;Enable the Google Pay™ API for your project in the Google Cloud Console.
* Integrate the Google Pay™ SDK library into your mobile app. Follow the instructions provided in the [Google Pay™ Developer Documentation](https://developers.google.com/pay/api).
* Ensure that the merchant's app is capable of securely transmitting payment data to your backend server.


# Step 2: Implement Server-Side Integration

* Configure your backend server to handle Google Pay™ payment requests.
* Set up a secure endpoint to receive encrypted payment data requests from the Google Pay™ SDK.
* Alternatively, you can send the encrypted payment data directly from your mobile app if you do not wish to integrate it from your backend server.
* Follow the [API integration](/api-integration) to send a request to Callphone to process the request.


# Step 3: Testing

* Perform comprehensive testing to ensure that the integration works smoothly in both sandbox and production environments.
* Test various scenarios, including successful transactions, declined payments, and error handling.
* Use the Google Pay™ testing tools and resources to validate the integration.


# API Integration

To get started ensure you have followed all the Google Pay™ Guidelines

## Android

* [Google Pay™ Android Developer Documentation](https://developers.google.com/pay/api/android/)
* [Google Pay™ Android Integration Checklist](https://developers.google.com/pay/api/android/guides/test-and-deploy/integration-checklist)
* [Google Pay™ Android Brand Guidelines](https://developers.google.com/pay/api/android/guides/brand-guidelines)<br>

## Web

* [Google Pay Web developer documentation](https://developers.google.com/pay/api/web/)
* [Google Pay Web integration checklist](https://developers.google.com/pay/api/web/guides/test-and-deploy/integration-checklist)&#x20;
* [Google Pay Web Brand Guidelines](https://developers.google.com/pay/api/web/guides/brand-guidelines)

<figure><img src="/files/06aT1M8eSJbzWknbOryA" alt=""><figcaption><p><strong>Payment Flow</strong></p></figcaption></figure>

From the diagram above, the merchant retrieves the payment payload from google pay SDK after customer has chosen their preferred payment option or card. The Google™ encrypted payment data should be sent to our payment gateway as described below:

#### Sample header

```
   headers: {
            Authorization: `Bearer ${merchant_api_key}`
          }
```

Every merchant will be assigned an API key. This key should not be shared with anyone and will be used to authorise all requests from your backend server.

#### Request Method

```
POST https://googlepay.airvend.ng/api/v1/payment
```

#### Sample request

```
{
   "amount": 1000,
   "currency": "NGN",
   "customer": {
       "first_name": "John",
       "last_name": "Doe",
       "email": "2hY9a@example.com",
       "address": "No. 1, abc road",
       "country": "NG"
   },
   "payload": {
       "signature": "MEUCIHhyKwqjewT1+VhQT+bFe50VUs7dakk/akF61BdJyICYAiEAhmBu2/Uik0lLEv60Tyt6q6T7NIgf2vX8g4O44+IkWVo\u003d",
       "intermediateSigningKey": {
           "signedKey": "{\"keyValue\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE37Ls6vrMA60BGY/0MiFfINwWnZ3xLi3dV3QafSmjgh3Y0KjKGZh5DtwR4ILj9+l+TAWWlumb3gKLi2TIruT/PA\\u003d\\u003d\",\"keyExpiration\":\"1694104388000\"}",
           "signatures": [
               "MEUCIEd/h2QwfAWvchZSbfjN9U5pFS0LoRQ5cG6d1dQWLRK0AiEAtUfxKfkXjkF2GQo+/sk3aLHH0pSjIiVuVro+YIL+KJU\u003d"
           ]
       },
       "protocolVersion": "ECv2",
       "signedMessage": "{\"encryptedMessage\":\"0bIPUNk6r9hmQv6X3Zn0mOyIglrJMaK0FkP2Lxk56YIDwtA7KWAUWYAJwG5ab0vXhG0rNi+cAWJcp3SatStylWdtrqbNCcpq8e+5VD6UmFuocfRjkjq/Q0vX5ZqfwtFHKrU0YpByXUSt87R0oFNyZcStjiK5S3x6rDzX30bDO6n3Nu0kY3yyhP4RMumMfDiXRxgxQb8bpNKDfaAZCkJB98SJrobxtS720HZzG4zdMZOzTDpTkU2i8XgTwOon0ozvcum9dMQf5F32u0r/zab6CbMK7mkP0PuYWm/iPZ7vNA35hjdIxw1vfPn4H8uGnuXWYVO/pqVVyznbV3KoPJXtfsohdd4xp/vXXHm3GSUxVaLFrZr8Y0DpyPJ+R/Qywzxf9cSC8O+e0VF4nzA4xUrbKkf4pSE3I0b89cQSv28Ev3ugELZm7EFTTzHyvYevfNOERpkDZVKFsBOM5KmPQs9LIhXhOKVOZdWbfKR3ghFKElyLO4L/alwhiub3KXysAq9QyRHR46iyepErab5VcxuovZv4DazKeH8A0hThei/lxS5EnXuyfl/jHxaNh6QvVssWfynA3ggPO/JGbRwWGhrsx5SCFWOOiLJHc2lJ7dPSfHfHNpDDDzDnXo7jCDp+QaUHMyXzrfnOSdJr\",\"ephemeralPublicKey\":\"BBO8U7zJXWYxcqVmbL+299/eLBO7+vsm32ljDnxjGecF8W00rbtuGbTomZAEaVvVBeSdZHdOoin4GZxAjbzauIM\\u003d\",\"tag\":\"utn4o/GuIS9sHmYVJv/AFzHrtwIGn87hhLdcO5QidQU\\u003d\"}"
   }
}

```

## Sample Request Description

<table><thead><tr><th width="128">Property</th><th width="86">Type</th><th width="108">Necessity</th><th>Description</th></tr></thead><tbody><tr><td>amount</td><td>int</td><td>Required</td><td>Transaction amount</td></tr><tr><td>currency</td><td>string</td><td>Required</td><td>Transaction currency</td></tr><tr><td>customer</td><td>object</td><td>Required</td><td>Parameters specific to the customer details</td></tr><tr><td>first_name</td><td>string</td><td>Required</td><td>Customer first name</td></tr><tr><td>last_name</td><td>string</td><td>Required</td><td>Customer last name</td></tr><tr><td>email</td><td>string</td><td>Required</td><td>Customer email</td></tr><tr><td>address</td><td>string</td><td>Required</td><td>Customer address</td></tr><tr><td>country</td><td>string</td><td>Required</td><td>Customer country</td></tr><tr><td>payload</td><td>object</td><td>Required</td><td>Parameters generated from Google Pay™</td></tr></tbody></table>


# Authorisation methods

The authorisation methods supported for merchants in Nigeria are:

CRYPTOGRAM\_3DS and PAN\_ONLY


# Card Networks

We currently support the following card networks:

* Verve
* Visa
* MasterCard


# Handling 3DS

If the transaction being carried out is a 3DS transaction, a redirect link will be returned to the merchant to redirect their customers to a web view to verify their identity with the card issuer.

The web view that the customer will be redirected to is a verification page on their bank site where the customer will be required to enter a password linked to the card or an OTP sent to the customer's registered mobile number or email address.

Once the authentication is completed, the card issuer generates an authentication response and sends it back to the merchant. The customer will then be redirected back to the merchant's application where the transaction will either be approved or rejected based on the response received from the card issuer.


# Resources

* [Google Pay™ Integration Guide ](https://developers.google.com/pay/api/android/overview)
* [Google Pay™ API Reference ](https://developers.google.com/pay/api)


# Onboarding

To be a merchant on Callphone, contact the business team:

Contact email: [info@callphoneng.com](mailto:Info@callphoneng.com)&#x20;

Phone: +234 9061163130

After you have been onboarded, our gateway ID will be shared with you. You will also be assigned a gateway merchant ID by Google when you register.

|                      |                                                          |
| -------------------- | -------------------------------------------------------- |
| Callphone gateway ID | airvend                                                  |
| gatewayMerchatID     | The gateway merchant ID is assigned on signup by google™ |

As part of our KYC procedure, the assigned gatewayMerchatID will be required from merchants onboarding on our platform.


