Skip to main content

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 numberInterval
130s
21m
43m
68m
16453m
Request Body
  • environment string

    Environment

  • webhookType string required

    Possible values: [GRANT, TRANSACTIONS]

    Webhook type:

    • GRANT - Webhook for grant
    • TRANSACTIONS - 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 grant
      • USER_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 is ERROR

  • errorType string

    Error type

  • errorCode string

    Possible 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 authentication
    • PREVENTION_WEB - Block login from financial services website
  • errorMessage string

    Error description

  • transaction object nullable

    The transfer information, the value of transactionCode or reference 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 servicetransactionCodereference
    MBBanktruetrue
    OCBfalsetrue
  • id string required

    The internal identifier of the transaction.

  • transactionCode string nullable

    The transaction code of the financial service, can't be used to check with the bank.

  • reference string nullable

    The 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 required

    Transaction date. Also known as valueDate

  • transactionDateTime string nullable

    Transaction date and time. Also known as valueDateTime

  • bookingDate string nullable

    The date and time when the transaction was posted on the financial institution’s books

  • amount number required

    Exact transaction amount

  • description string required

    Available detailed transaction descriptions

  • runningBalance number nullable

    Balance after operation

  • accountNumber string required

    Bank account number

  • virtualAccountNumber string nullable

    Virtual account number

  • virtualAccountName string nullable

    Virtual account name

  • paymentChannel string nullable

    Payment channel. Possible values: Napas247 | Nội bộ | Citad | Swift

  • counterAccountNumber string nullable

    Counter account number

  • counterAccountName string nullable

    Counter account name

  • counterAccountBankId string nullable

    The bank's BIN of the counterpart's account

  • counterAccountBankName string nullable

    Counter account bank name

  • paymentMeta object
  • referenceNumber string

    Partner's Order code

  • fiId string required

    Financial institution identifier

  • fiName string required

    Financial institution name

  • fiServiceId string required

    Financial institution’s service identifier

  • fiServiceName string required

    Financial institution’s service name

  • currency string required

    Currency

Responses

Success

Loading...