The webhook allows you to receive instant notifications about payment status from the payment gateway. A webhook is sent in JSON, similar to what you would get in response to a typical API request. Below is the body of the Payment Gateway webhook.
API ARCHITECTURE: REST
API Method: POST
Endpoint: To be updated on the API settings.
To set up your webhook from the Merchant Portal, navigate to the Profile and Settings, select the API Integrations, and click "Setup Webhook". Enter the URL, select the API from the dropdown and hit save. Feel free to use https://webhook-test.com/ to get a URL for testing webhook delivery.
IP Addresses
Ensure to whitelist the following IP addresses to ensure that you only receive webhooks from Hydrogen. Webhooks outside of this IP should be blocked and are not valid.
- 20.54.14.223
- 20.67.189.4
JSON Response
{
"id": "02400000-f841-2ad1-26ef-08dce2d6f08f",
"amount": 110,
"chargedAmount": 110,
"currency": "NGN",
"customerEmail": "[email protected]",
"narration": null,
"description": "Dev transaction",
"status": "Paid",
"transactionStatus": "Paid",
"transactionRef": "testingfeevattransfers3",
"processorResponse": null,
"createdAt": "2024-10-02T12:39:56.6559975",
"paidAt": "2024-10-02T12:39:56.6559975",
"ip": null,
"paymentType": "BankTransfer",
"authorizationObject": null,
"meta": "Dev payment",
"fees": 1.1,
"vat": 0.08,
"recurringCardToken": null
}
Response
Field | Type | Description |
---|---|---|
id | String | Unique identifier for the transaction. |
amount | Decimal | The total amount of the transaction |
chargedAmount | Decimal | The actual amount charged for the transaction. |
currency | String | The currency in which the transaction is conducted (NGN, USD or GBP). |
customerEmail | String | Email address of the customer making the transaction. |
narration | String | A brief description or note about the transaction. |
status | String | The current state of the transaction. Possible values are Pending, Failed, and Paid. |
transactionRef | String | Reference code for the transaction, useful for tracking and identification. |
createdAt | DateTime | The timestamp when the transaction was created. |
paidAt | DateTime | The timestamp when the transaction was done. |
ip | String | The IP address from which the transaction was initiated. |
paymentType | String | The method of payment used for the transaction (e.g., Card or BankTransfer). |
fees | Decimal | Any fees associated with the transaction, in the smallest unit of the currency. |
meta | String | Additional metadata about the transaction, useful for custom information. |