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:
Copy 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.
Copy POST https://googlepay.airvend.ng/api/v1/payment
Copy {
"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