Callback Message Transfer

Between Payment Gateway and Partner’s Website

Request Parameters

A server-to-server callback is sent from the payment gateway to the merchant's website to confirm payments and update the payment status. This data is transmitted as an HTTP POST request to the merchant's website.

Callback Data:

  • data: Base64-encoded JSON document string
  • sign: Signature, generated based on the data string

Example:

{
    "data": "eyJ0cmFuc2FjdGlvbl9pZCI6IjMxMTExMTExIiwicmVmZXJlbmNlIjoiMTIzNDU2Nzg5IiwiYXBpX2tleSI6ImM4NGYxYWMwLWU0ZjAtMDEzMS01Mjk4LTcwOTIxYzU3YzJhMiIsImFtb3VudCI6IjMyNy43OCIsImN1cnJlbmN5IjoiVVNEIiwic3RhdHVzIjoiMyIsInN0YXR1c19uYW1lIjoic3VjY2VzcyIsInN5c3RlbV9hbW91bnQiOiIzMjcuNzgiLCJzeXN0ZW1fY3VycmVuY3kiOiJVU0QiLCJvcGVyYXRpb25fYW1vdW50IjoiMzI3Ljc4IiwiY29tbWlzc2lvbiI6IjAuMCIsInBheW1lbnRfc3lzdGVtX3R5cGUiOiJkaXJlY3QiLCJjYXJkX251bWJlciI6IjQxMTExMSoqKioqKjExMTEiLCJjYXJkX3BhbjYiOiI0MTExMTEiLCJjYXJkX3BhbjQiOiIxMTExIiwiY2FyZGhvbGRlcl9uYW1lIjoiVGFzdHkgVGVzdCIsInByb2Nlc3NpbmdfZXJyb3JfbXNnIjoiIiwiYXV0aG9yaXphdGlvbl9jb2RlIjoiIiwicGFyYW1zIjoie1widXNlcl9pZFwiPVx1MDAzZVwidGVzdF91c2VyXCIsIFwidXNlcl9lbWFpbFwiPVx1MDAzZVwidGVzdEB0ZXN0LmNvbVwiLCBcImZsYWdfZ2V0X3VybFwiPVx1MDAzZVwiMVwifSJ9",
    "sign": "68e271b78aa3aa29f1c57f1894248b76"
} 

Signature check (PHP example):

hash_hmac('md5', $_POST['data'], $secret_key) === $_POST['sign'])

Where:

  • secret_key - shop password

JSON Callback Parameters

ParameterDescription
transaction_idA unique transaction identifier in the payment gateway system.
referenceA unique order number in the shop system.
api_keyShop key (identifier).
amountBasic payment price.
currencyGood’s price currency. Possible values: EUR, USD.
statusProcessing status:
0 – Transaction is created (not processed, User is redirected to finish a payment, e.g., at 3DS verification);
1 – Successful authorization (funds hold);
2 – Successful unlock of funds;
3 – Successful payment;
4 – Successful refund;
8 – Processing incomplete;
98 – Expired (transaction expired);
99 – Processing error (unsuccessful payment).
status_nameStatus description
system_amountFinal price, which is paid by User including a payment provider commission.
system_currencyPayment system currency.
operation_amountActual transaction’s price.
commissionPayment system commission value (currency is system_currency).
payment_system_typePayment system type.
card_numberPrimary Account Number (Optional, depends on connection type and acquirer).
card_pan6First 6 digits of card number.
card_pan4Last 4 digits of card number.
cardholder_nameCardholder name (Optional, depends on connection type and acquirer).
processing_error_msgProcessing error (if the processing status is 99).
authorization_codePayment system authorization code (Optional).
pay_tokenToken for recurrent payment formation (Optional, depends on payment gateway settings).
paramsMerchant’s parameters.
refund_init_typeDuring a refund operation, a sign is generated initiator:
api => 0 - Refund via API
front => 1 - Refund via website
admin => 2 - Refund via back-office

The merchant's website should respond to the callback with the OK string.

The payment gateway will resend the callback if the Merchant website doesn’t respond with the OK string.


API Reference

You can view a Reference API implementation for this method at this link