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": "eyJ0cmFuc2FjdGlvbl9pZCI6IjMxMTExMTExIiwicmVmZXJlbmNlIjoiMTIzNDU2Nzg5IiwiYXBpX2tleSI6ImM4NGYxYWMwLWU0ZjAtMDEzMS01Mjk4LTcwOTIxYzU3YzJhMiIsImFtb3VudCI6IjMyNy43OCIsImN1cnJlbmN5IjoiVVNEIiwic3RhdHVzIjoiMyIsInN0YXR1c19uYW1lIjoic3VjY2VzcyIsInN5c3RlbV9hbW91bnQiOiIzMjcuNzgiLCJzeXN0ZW1fY3VycmVuY3kiOiJVU0QiLCJvcGVyYXRpb25fYW1vdW50IjoiMzI3Ljc4IiwiY29tbWlzc2lvbiI6IjAuMCIsInBheW1lbnRfc3lzdGVtX3R5cGUiOiJkaXJlY3QiLCJjYXJkX251bWJlciI6IjQxMTExMSoqKioqKjExMTEiLCJjYXJkX3BhbjYiOiI0MTExMTEiLCJjYXJkX3BhbjQiOiIxMTExIiwiY2FyZGhvbGRlcl9uYW1lIjoiVGFzdHkgVGVzdCIsInByb2Nlc3NpbmdfZXJyb3JfbXNnIjoiIiwiYXV0aG9yaXphdGlvbl9jb2RlIjoiIiwicGFyYW1zIjoie1widXNlcl9pZFWcVx1MDAzZVwidGVzdF91c2VyXCIsIFwidXNlcl9lbWFpbFwiPVx1MDAzZVwidGVzdEB0ZXN0LmNvbVwiLCBcImZsYWdfZ2V0X3VybFwiPVx1MDAzZVwiMVwifSJ9",
    "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_idUnique transaction ID in the payment gateway system.
referenceUnique order number in the shop system.
api_keyShop key (identifier).
amountBasic payment price.
currencyCurrency of the payment. Possible values: EUR, USD.
statusNumeric payment status (see status codes below).
status_nameStatus description.
system_amountFinal amount paid by user, including provider commission.
system_currencyCurrency used by the payment system.
operation_amountActual transaction amount.
commissionPayment system commission value (in system_currency).
payment_system_typeType of the payment system used.
card_numberFull card number (optional, depends on integration type).
card_pan6First 6 digits of the card number.
card_pan4Last 4 digits of the card number.
cardholder_nameName on the card (optional, depends on integration type).
processing_error_msgError message if status = 99.
authorization_codePayment system authorization code (optional).
pay_tokenRecurrent payment token (optional, depends on settings).
paramsCustom merchant parameters.
refund_init_typeRefund initiator: 0 = API, 1 = website, 2 = back-office.
refund_referencePartner’s refund reference ID.

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.