Webhooks: Example
Webhooks: Example
Overview
- Webhooks allow clients to receive real-time notifications about the status and progression of their transactions.
- Once a transaction is created, the platform sends a webhook on each status change if a delivery URL is configured.
- Fields with empty (
null) values are omitted from the webhook body. Do not expect every field to be present in every callback — presence depends on the transaction outcome, payment method and transaction type.
8B uses the transaction's webhook URL when supplied, then falls back to the settlement account's default URL. A refund's URL is selected independently of the original payment. Webhook delivery rules.
Example
The examples below show the JSON body. When signing is enabled, 8B sends the notification ID and signature in HTTP headers. Use the raw bytes received by your endpoint to verify the request. Signed request and test key.
- Sent on every payment status change (e.g., ACCEPTED, DECLINED, ERROR), not only for terminal statuses.
- Triggered By: Internal processing events after payment intent creation.
- In these payment examples, the client supplies
webhookUrlwhen creating the intent. Follow the relevant payment method guide for the request fields. - For failed transactions the error fields depend on the status:
DECLINEDcomes withdeclineCode/declineMessage(business decline by the bank or platform),ERRORcomes witherrorCode/errorMessage(processing failure). - Error codes and messages in the
Errorexample below are illustrative; actual values depend on the processing failure.
{
"intentId": "350178709515759616",
"intentStatus": "FINALIZED",
"createdAt": 1787556310.354561,
"updatedAt": 1787556325.629632,
"completedAt": 1787556325.629035,
"clientReferenceId": "card_h2h_20260824072507",
"paymentMethodName": "BankCardKZ",
"submittedAmount": {
"value": 20,
"currency": "KZT"
},
"authAmount": {
"value": 20,
"currency": "KZT"
},
"rate": "1.000000000000000000",
"transactionType": "PAYMENT",
"transactionId": "350178710098767872",
"status": "CAPTURED",
"isStoredCredential": false,
"last4": "7963",
"maskedNumber": "220070******7963"
}{
"transactionType": "PAYMENT",
"transactionId": "350178612891578368",
"status": "DECLINED",
"declineCode": "62",
"declineMessage": "The account or card has restrictions that prevent this transaction",
"createdAt": 1787556287.071637,
"updatedAt": 1787556295.092956,
"clientReferenceId": "card_h2h_20260824072444",
"paymentMethodName": "BankCardKZ",
"submittedAmount": {
"value": 20,
"currency": "KZT"
},
"authAmount": {
"value": 20,
"currency": "KZT"
},
"rate": "1.000000000000000000",
"intentId": "350178611859779584",
"intentStatus": "FINALIZED",
"isStoredCredential": false,
"last4": "9301",
"maskedNumber": "220220******9301"
}{
"transactionType": "PAYMENT",
"transactionId": "350178612891578369",
"status": "ERROR",
"errorCode": "TESTERRORCODE",
"errorMessage": "error message",
"createdAt": 1787556391.118240,
"updatedAt": 1787556399.402117,
"clientReferenceId": "card_h2h_20260824072531",
"paymentMethodName": "BankCardKZ",
"submittedAmount": {
"value": 20,
"currency": "KZT"
},
"authAmount": {
"value": 20,
"currency": "KZT"
},
"rate": "1.000000000000000000",
"intentId": "350178611859779585",
"intentStatus": "FINALIZED",
"isStoredCredential": false,
"last4": "5511",
"maskedNumber": "220024******5511",
"clientData": {
"key1": "val1",
"key2": "val2"
}
}Fields Description
| Field | Type | Description |
|---|---|---|
intentId | string | Unique identifier of the payment intent created by the client. |
intentStatus | string | Current status of the intent. Example: CREATED, FINALIZED. |
createdAt | timestamp | Time when the record was created, in Unix timestamp format (seconds, fractional allowed). |
updatedAt | timestamp | Time when the record was last updated. |
completedAt | timestamp | Time when the transaction was completed. Present only in webhooks for successfully completed transactions. |
clientReferenceId | string | Client-side identifier used to correlate this transaction with internal systems. |
paymentMethodName | string | Payment method used for the transaction (e.g. BankCardKZ). |
isStoredCredential | boolean | true if the payment was made with a previously saved card. Sent for payment webhooks only (absent for refunds and disbursements). |
last4 | string | Last 4 digits of the card number. Present for card payments. |
maskedNumber | string | Masked card number, e.g. 220070******7963. Present for card payments. |
submittedAmount | object | Amount provided by the client in the original (submitted) currency. |
submittedAmount.value | number | Monetary value of the submitted amount |
submittedAmount.currency | string | ISO currency code of the submitted amount (e.g. KZT). |
authAmount | object | Amount authorised by the payment system (settlement currency). |
authAmount.value | number | Monetary value of the authorised amount. |
authAmount.currency | string | ISO currency code of the authorised amount. |
rate | string | FX rate applied between submitted and authorised currencies, as a decimal string. Equals "1.000000000000000000" when no conversion was applied. May be absent. |
transactionType | string | Identifies the transaction type. Enum: PAYMENT, DISBURSEMENT, REFUND |
transactionId | string | Unique identifier of the transaction generated by the platform. |
status | string | Current transaction status. Examples: CAPTURED, ACCEPTED, DECLINED, ERROR |
declineCode | string | Platform or bank decline code. Present when the transaction was declined (status DECLINED). |
declineMessage | string | Human-readable explanation of the decline reason. |
errorCode | string | Technical or business error code explaining why the transaction failed. Present when the transaction failed with a processing error (status ERROR). |
errorMessage | string | Human-readable error message describing the failure. |
additionalParams | object | Additional parameters returned by the payment provider or bank. Payment method-specific and may be absent; not included in DECLINED/ERROR callbacks. |
clientData | object | Arbitrary client-provided metadata stored and returned unchanged. Present if it was provided in the intent. |
Depending on the transaction type, the webhook may also contain the fields reason, originalPaymentId and clientReferenceTransactionId (e.g. for refunds).
Some webhooks may contain additional parameters. The inclusion of this additional data depends on the payment method and may or may not be present in the request.
{
"additionalParams": {
"rrn": "111",
"approvalCode": "ABC123"
}
}Updated 4 days ago
