Integration GuideAPI Reference
Integration Guide

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 webhookUrl when creating the intent. Follow the relevant payment method guide for the request fields.
  • For failed transactions the error fields depend on the status: DECLINED comes with declineCode / declineMessage (business decline by the bank or platform), ERROR comes with errorCode / errorMessage (processing failure).
  • Error codes and messages in the Error example 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

FieldTypeDescription
intentIdstringUnique identifier of the payment intent created by the client.
intentStatusstringCurrent status of the intent. Example: CREATED, FINALIZED.
createdAttimestampTime when the record was created, in Unix timestamp format (seconds, fractional allowed).
updatedAttimestampTime when the record was last updated.
completedAttimestampTime when the transaction was completed. Present only in webhooks for successfully completed transactions.
clientReferenceIdstringClient-side identifier used to correlate this transaction with internal systems.
paymentMethodNamestringPayment method used for the transaction (e.g. BankCardKZ).
isStoredCredentialbooleantrue if the payment was made with a previously saved card. Sent for payment webhooks only (absent for refunds and disbursements).
last4stringLast 4 digits of the card number. Present for card payments.
maskedNumberstringMasked card number, e.g. 220070******7963. Present for card payments.
submittedAmountobjectAmount provided by the client in the original (submitted) currency.
submittedAmount.valuenumberMonetary value of the submitted amount
submittedAmount.currencystringISO currency code of the submitted amount (e.g. KZT).
authAmountobjectAmount authorised by the payment system (settlement currency).
authAmount.valuenumberMonetary value of the authorised amount.
authAmount.currencystringISO currency code of the authorised amount.
ratestringFX rate applied between submitted and authorised currencies, as a decimal string. Equals "1.000000000000000000" when no conversion was applied. May be absent.
transactionTypestringIdentifies the transaction type.
Enum: PAYMENT, DISBURSEMENT, REFUND
transactionIdstringUnique identifier of the transaction generated by the platform.
statusstringCurrent transaction status. Examples: CAPTURED, ACCEPTED, DECLINED, ERROR
declineCodestringPlatform or bank decline code. Present when the transaction was declined (status DECLINED).
declineMessagestringHuman-readable explanation of the decline reason.
errorCodestringTechnical or business error code explaining why the transaction failed. Present when the transaction failed with a processing error (status ERROR).
errorMessagestringHuman-readable error message describing the failure.
additionalParamsobjectAdditional parameters returned by the payment provider or bank.
Payment method-specific and may be absent; not included in DECLINED/ERROR callbacks.
clientDataobjectArbitrary 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"
  }
}

Did this page help you?