# API Integration

## 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://googlepay.airvend.ng/api-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
