Once you have successfully reserved an account, it’s important you implement a webhook url. This is how we notify you when a transfer is done to that account. Implementing a webhook URL is rather easy, you simply need to create an endpoint that accepts post requests and can calculate a HASH value for security. Here is what we send to your webhook url:
Please do not forget to include the pipe character (
|") where specified above. It should be included in the concatenated string being hashed.
Here is what a sample post to your webhook URL will look like:
Get Transaction Status
(M) indicates fields that are mandatory in the request body. (m) Indicates fields that are mandatory only if the parent object is not empty.
|totalPayable (M)||The amount to be paid by the customer|
|amountPaid||The exact amount paid by the customer|
Payment Status. Should always be `PAID` for reserved accounts.
|settlementAmount||The amount settled to the merchant. This is the amount paid minus the merchants' fee.|
Defaults to the account name
Hash calculated and sent by Monnify with each notification request. Merchant is expected to calculate the Hash using the request body. If the hash values don’t match, please do not honor the notification request.
|currencyCode (M)||The currency of the transaction being initialized. "NGN"|
|paymentMethod||The method used by the customer to process the transaction `ACCOUNT_TRANSFER` of `CARD`|
|product||The object containing information specific to the product being used.|
|product.type||The monnify product in use for this payment e.g. Web_SDK, Reserved_Account, Invoice, etc.|
|product.reference||The unique reference applicable to the product e.g. Account_Reference, Invoice Reference, payment reference, etc.|
|cardDetails||The object containing information specific to the card used for payment. Will only be populated if the payment method was a card. else it will be null|
|cardDetails.cardType||Card type (VISA, MASTER, VERVE)|
|cardDetails.authorizationCode||Transaction authorization code|
|cardDetails.last4||Last 4 digits of the card|
|cardDetails.expMonth||Expiry month of the card following DATE convention i.e. January is 00 and December is 11.|
|cardDetails.expYear||Expiry year of the card in YYYY format|
|cardDetails.bin||First 6 digits of the card|
|cardDetails.reusable||Boolean to specify if the authorizationCode is reusable|
|accountDetails||The object containing information specific to the sender's bank information. Will only be populated if the payment method was ACCOUNT_TRANSFER. else it will be null|
|accountDetails.accountNumber||Source account number for that transaction. This is the account number the customer transferred from during payment.|
|accountDetails.accountName||Source account name for that transaction. This is the account name of the account the customer transferred from during payment.|
|accountDetails.bankCode||Bank code of the source bank where the customer transferred from.|
|accountPayments||An array of accountDetails objects. Useful when multiple transfers were made for one transaction.|
|customer||The object containing the customer information|
|customer.customerName||Full name of the customer|
|customer.customerEmail||The email address of the customer|