Webhooks: Example

Overview

  • Webhooks allow clients to receive real-time notifications about the status and progression of their transactions.
  • Once a transaction created, the platform will send webhook callbacks to the URLs provided by the client on every status change.

Note: We do not modify, transform, or alter in any way the webhook URLs received from clients. The exact URL provided in the intent creation request is the one used for all webhook callbacks.


Example

  • Sent when a payment status changes (e.g., ACCEPTED, DECLINED, ERROR). Not only terminal statuses, but all.
  • Triggered By: Internal processing events after payment intent creation.
  • Client must provide URL in: webhookUrl inside the request

Example:

{
    "transactionType": "PAYMENT",
    "transactionId": "111111",
    "status": "CAPTURED",
    "errorCode": null,
    "errorMessage": null,
    "intentId": "11111",
    "intentStatus": "FINALIZED",
    "createdAt": "2024-01-15T10:30:45.123456Z",
    "updatedAt": "2024-01-15T10:30:45.123456Z",
    "clientReferenceId": "test1",
    "paymentMethodName": "SBP",
    "submittedAmount": {
        "value": 1.00,
        "currency": "RUB"
    },
    "authAmount": {
        "value": 1.00,
        "currency": "RUB"
    },
    "rate": null,
    "declineCode": null,
    "declineCodeMessage": null,
    "additionalParams": {
        "rrn": "111",
        "approvalCode": "ABC123"
    },
    "clientData": {
        "key1": "val1",
        "key2": "val2"
    }
}
{
    "transactionType": "PAYMENT",
    "transactionId": "111111",
    "status": "DECLINED",
    "errorCode": "TESTERRORCODE",
    "errorMessage": "error message",
    "createdAt": 1705315845.123456
}

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.

clientReferenceId

string

Client-side identifier used to correlate this transaction with internal systems

paymentMethodName

string

Payment method used for the transaction (e.g. BankCard).

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. RUB).

authAmount

object

Amount authorised by the payment system (settlement currency).

authAmount.value

number

Monetary value of the authorised amount.

authAmount.currency

string

Successful flow ISO currency code of the authorised amount.

rate

number

FX rate applied between submitted and authorised currencies. null if no conversion was applied.

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, DECLINED, ACCEPTED

declineCode

string

Platform or bank decline code. null if the transaction was not declined

declineMessage

string

Human-readable explanation of the decline reason

errorCode

string

Technical or business error code explaining why the transaction failed.

errorMessage

string

Human-readable error message describing the failure.

additionalParams

object

Additional parameters returned by the payment provider or bank.
Payment Method-specific.

clientData

string

Arbitrary client-provided metadata stored and returned unchanged


Some webhooks may contain additional data. The inclusion of this additional data depends on the payment method and may or may not be present in the request.

{
  "additionalData": {
    "PaymentMethodAdditionalField": "string",
    "PaymentMethodAdditionalField": "string",
    "PaymentMethodAdditionalField": "string"
  }
}