Webhook
Webhook is a HTTTP request used to deploy event responses.
bankHub will send webhook information about changes to bankHub grant
or financial transaction information.
For example, bankHub will send a webhook when a grant is failing or a transaction arises from an order created.
To receive the bankHub webhook, you need to set up an endpoint on your server method is POST. Then provide this endpoint URL to bankHub as described below.
Webhook Configuration
Webhook is configured through bankHub Console. When setting up a webhook, the URL must be http(s)://your-domain.com/webhook-endpoint.
bankHub will send data in POST and raw JSON format from one of the following IP addresses::
- 34.87.150.47
- 34.124.145.244
Delivery Attempts and Retries(17 attempts)
In cases where the http status is 4XX, 5XX, or no response within 30 seconds, bankHub will send the webhook back to your system 17 times within 24 hours and the time interval after each call is based on fibbonanci.
Example:
Retry number | Interval |
---|---|
1 | 30s |
2 | 1m |
4 | 3m |
6 | 8m |
16 | 453m |
- application/json
Request Body
- environment string
Environment
- webhookType string required
Possible values: [
GRANT
,TRANSACTIONS
]Webhook type:
GRANT
- Webhook for grantTRANSACTIONS
- Webhook for transaction data
- webhookCode string required
Possible values: [
ERROR
,USER_PERMISSION_REVOKED
,DEFAULT_UPDATE
]Webhook code
-
Webhook type is GRANT included:
ERROR
- Error from financial account associated with grantUSER_PERMISSION_REVOKED
- End user deletes grant granted to application
-
Webhook type is TRANSACTIONS included:
DEFAULT_UPDATE
- A new banking transaction arises to an decentralized account
-
- grantId string nullable
Grant ID, the value exists when the webhook type is
GRANT
error object nullable
Corresponding grant error information, the value exists when the webhook type is
GRANT
and the Webhook code isERROR
errorType stringError type
errorCode stringPossible values: [
GRANT_LOGIN_REQUIRED
,OTP_REQUIRED
,PREVENTION_WEB
]Error code from financial account
GRANT_LOGIN_REQUIRED
- Login information changed like: password,...OTP_REQUIRED
- Request OTP authenticationPREVENTION_WEB
- Block login from financial services website
errorMessage stringError description
transaction object nullable
The transfer information, the value of
transactionCode
orreference
can be used to identify a financial transaction, but depending on which field the financial service will support, one of the two financial services will be valid or there will be both.Financial institution’s service transactionCode reference MBBank true
true
OCB false true
id string requiredThe internal identifier of the transaction.
transactionCode string nullableThe transaction code of the financial service, can't be used to check with the bank.
reference string nullableThe transaction reference code of a financial service, used to check with a bank, is the official code displayed on Internet banking. This code can be duplicate in some cases. Some banks such as Agribank and Eximbank do not have this code available
transactionDate string requiredTransaction date. Also known as valueDate
transactionDateTime string nullableTransaction date and time. Also known as valueDateTime
bookingDate string nullableThe date and time when the transaction was posted on the financial institution’s books
amount number requiredExact transaction amount
description string requiredAvailable detailed transaction descriptions
runningBalance number nullableBalance after operation
accountNumber string requiredBank account number
virtualAccountNumber string nullableVirtual account number
virtualAccountName string nullableVirtual account name
paymentChannel string nullablePayment channel. Possible values: Napas247 | Nội bộ | Citad | Swift
counterAccountNumber string nullableCounter account number
counterAccountName string nullableCounter account name
counterAccountBankId string nullableThe bank's BIN of the counterpart's account
counterAccountBankName string nullableCounter account bank name
paymentMeta object
referenceNumber stringPartner's Order code
fiId string requiredFinancial institution identifier
fiName string requiredFinancial institution name
fiServiceId string requiredFinancial institution’s service identifier
fiServiceName string requiredFinancial institution’s service name
currency string requiredCurrency
- 200
Success