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:
webhookUrlinside 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 |
|---|---|---|
| string | Unique identifier of the payment intent created by the client. |
| string | Current status of the intent. Example: CREATED, FINALIZED. |
| timestamp | Time when the record was created, in Unix timestamp format (seconds, fractional allowed). |
| timestamp | Time when the record was last updated. |
| string | Client-side identifier used to correlate this transaction with internal systems |
| string | Payment method used for the transaction (e.g. BankCard). |
| object | Amount provided by the client in the original (submitted) currency. |
| number | Monetary value of the submitted amount |
| string | ISO currency code of the submitted amount (e.g. RUB). |
| object | Amount authorised by the payment system (settlement currency). |
| number | Monetary value of the authorised amount. |
| string | Successful flow ISO currency code of the authorised amount. |
| number | FX rate applied between submitted and authorised currencies. null if no conversion was applied. |
| string | Identifies the transaction type. |
| string | Unique identifier of the transaction generated by the platform. |
| string | Current transaction status. Examples: CAPTURED, DECLINED, ACCEPTED |
| string | Platform or bank decline code. null if the transaction was not declined |
| string | Human-readable explanation of the decline reason |
| string | Technical or business error code explaining why the transaction failed. |
| string | Human-readable error message describing the failure. |
| object | Additional parameters returned by the payment provider or bank. |
| 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"
}
}Updated 4 days ago
