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 stringsign
: 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
Parameter | Description |
---|---|
transaction_id | Unique transaction ID in the payment gateway system. |
reference | Unique order number in the shop system. |
api_key | Shop key (identifier). |
amount | Basic payment price. |
currency | Currency of the payment. Possible values: EUR, USD. |
status | Numeric payment status (see status codes below). |
status_name | Status description. |
system_amount | Final amount paid by user, including provider commission. |
system_currency | Currency used by the payment system. |
operation_amount | Actual transaction amount. |
commission | Payment system commission value (in system_currency). |
payment_system_type | Type of the payment system used. |
card_number | Full card number (optional, depends on integration type). |
card_pan6 | First 6 digits of the card number. |
card_pan4 | Last 4 digits of the card number. |
cardholder_name | Name on the card (optional, depends on integration type). |
processing_error_msg | Error message if status = 99. |
authorization_code | Payment system authorization code (optional). |
pay_token | Recurrent payment token (optional, depends on settings). |
params | Custom merchant parameters. |
refund_init_type | Refund initiator: 0 = API, 1 = website, 2 = back-office. |
refund_reference | Partner’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.
Updated 16 days ago