Callback
Getting status and information about payment

How it works?
  1. The company sends a request for payment, with transfer of the server_url.
  2. After processing the operation by processing LiqPay and obtaining the final status, a POST request will be sent to your server with data and signature, where:
  3. data - json string with APIs parameters encoded by the function base64, base64_encode( json_string ),
    signature - is the unique signature of each request base64_encode( sha1( private_key + data + private_key) ),
    base64_encode - returns a string encoded by the base64,
    sha1 - returns the hash as a binary string of 20 characters.
  4. To authenticate a request from a LiqPay server, you must:
  5. - form a signature on the side of your server, using the data received in response from LiqPay and your private_key,
    signature=base64_encode( sha1( private_key + data + private_key) )
    - the final signature must be compared with the received from Callback from LiqPay,
    - if the signature is identical, then you have received a genuine response from the server of LiqPay (not changed by a third party / without the intervention of third parties) and you can fulfill obligations to the customer on payment, in accordance with the received payment status.
  6. To get the current transaction status before receiving the final status in Callback, use the Payment Status API, which you can do at any one time.
Check of the callback of the signature
#!/bin/bash
PUBLIC_KEY='your_public_key'
PRIVATE_KEY='your_private_key'
POST_DATA='base64_post_string'
POST_SIGNATURE='tp+ZLmKm1/E83dIzUpx5ljcttP4='
# SIGNATURE is base64 encode result from sha1 binary hash from concatenate string ${PRIVATE_KEY}${POST_DATA}${PRIVATE_KEY}
SIGNATURE=$(echo -n "${PRIVATE_KEY}${POST_DATA}${PRIVATE_KEY}" | openssl dgst -binary -sha1 | base64)

if [ "x${POST_SIGNATURE}" == "x${SIGNATURE}" ]
then
echo "ok"
else
echo "invalid signature: ${POST_SIGNATURE} != ${SIGNATURE}"
fi


# POST_DATA in this example
# base64_post_string

# SIGNATURE in this example
# tp+ZLmKm1/E83dIzUpx5ljcttP4=
$sign = base64_encode( sha1( 
$private_key .  
$data . 
$private_key 
, 1 ));
LiqPay liqpay = new LiqPay(PUBLIC_KEY, PRIVATE_KEY);
String sign = liqpay.str_to_sign(
PRIVATE_KEY + 
$data +
PRIVATE_KEY
);    
System.out.println(sign);
liqpay = LiqPay(PUBLIC_KEY, PRIVATE_KEY)
sign = liqpay.str_to_sign(
PRIVATE_KEY +
$data +
PRIVATE_KEY
)
liqpay = Liqpay::Liqpay.new(
:public_key  => 'public_key',
:private_key => 'private_key'
)
sign = liqpay.str_to_sign(
PRIVATE_KEY + 
$data +
PRIVATE_KEY
)
Sign = liqpay:str_to_sign(
<<PRIVATE_KEY/binary,  
Data/binary,
PRIVATE_KEY/binary>>
).
var LiqPay = require('liqpay');
var liqpay = new LiqPay(public_key, private_key);
var sign = liqpay->str_to_sign(
PRIVATE_KEY +
data +
PRIVATE_KEY
);
my $liqpay = Liqpay->new($public_key,$private_key);
my $sign = $liqpay->str_to_sign(
PRIVATE_KEY + 
$data +
PRIVATE_KEY
);
Init("my_public_key", "my_private_key")
Sign = MakeSignature(Data)
Response parameters
Parameter Type Description
acq_id Number Acquirer ID
action String Transaction type. Possible values: pay - payment, hold - amount of hold on sender's account, paysplit - splitting payments, subscribe - creation of a regular payment, paydonate - donation, auth - card preauth, regular - regular payment
agent_commission Number Agent comission in payment currency
amount Number Payment amount
amount_bonus Number Payer bonus amount in payment currency debit
amount_credit Number Payment amount for credit in currency of currency_credit
amount_debit Number Payment amount for debit in currency of currency_debit
authcode_credit String Authorization code for transaction of credit
authcode_debit String Authorization code for transaction of debit
card_token String Sender's card token
commission_credit Number Commission from the receiver in currency_credit
commission_debit Number Commission from the sender in currency_debit
completion_date String Charge date
create_date String Date of payment creation
currency String Payment currency
currency_credit String Transaction currency of credit
currency_debit String Transaction currency of debit
customer String Unique customer ID in your shop. Max length 100 symbols
description String Payment description
end_date String Date of payment edition/end
err_code String Error code
err_description String Error description
info String Additional payment information
ip String sender's IP address
is_3ds Boolean Possible values:
true - transaction passed with 3DS,
false - transaction passed without 3DS
liqpay_order_id String Payment order_id in LiqPay system
mpi_eci Number Possible values: 5 - the transaction passed with 3DS (issuer and acquirer support 3d Secure technology), 6 - the issuer of the payer card does not support 3d Secure technology, 7 - the operation passed without 3d Secure
order_id String Order_id payment
payment_id Number Payment id in LiqPay system
paytype String Methods of payment. Possible values card - card payment, liqpay - with liqpay account, privat24 - with privat24 account, masterpass - with masterpass account, moment_part - installments, cash - cash, invoice - to email, qr - qr code scanning.
public_key String Shop public key
receiver_commission Number Receiver comission in payment currency
redirect_to String The link to which a customer has to be redirected to confirm the payment with 3D-Secure
refund_date_last String Last return date for payment
rrn_credit String Unique transaction ID in authorization and settlement system of issuer bank Retrieval Reference number
rrn_debit String Unique transaction ID in authorization and settlement system of issuer bank Retrieval Reference number
sender_bonus Number Sender's bonus in the payment currency
sender_card_bank String Sender's card bank
sender_card_country String Sender's card country. Digital ISO 3166-1 code
sender_card_mask2 String Sender's card
sender_card_type String Sender's card type MC/Visa
sender_commission Number Commission from the sender in the payment currency
sender_first_name String The name of the sender
sender_last_name String sender's last name
sender_phone String Sender's phone number
status String Payment status.
Available values:
Final payment statuses
error Failed payment. Data is incorrect
failure Failed payment
reversed Payment refunded
subscribed Subscribed successfully framed
success Successful payment
unsubscribed Subscribed successfully deactivated
Statuses that required payment confirmation
3ds_verify 3DS verification is required.
To finish the payment you will require a 3ds_verify
captcha_verify Waiting for customer to confirm with captcha
cvv_verify Sender's card CVV is required.
To finish the payment you will require a cvv_verify
ivr_verify Waiting for customer to confirm with IVR
otp_verify OTP confirmation is required. OTP is sent to a customer phone number.
To finish the payment it is required otp_verify
password_verify Waiting for customer to confirm with Privat24
phone_verify Waiting for customer to enter a phone number.
To finish the payment you will require a phone_verify
pin_verify Waiting for customer to confirm with PIN-code
receiver_verify Receiver additional data is required.
To finish the payment you will require a receiver_verify
sender_verify Sender's additional data is required.
To finish the payment you will require a sender_verify
senderapp_verify Waiting for customer to confirm with SENDER
wait_qr Waiting for customer to scan QR-code
wait_sender Waiting for customer to confirm in mob app Privat24/SENDER
Other payment statuses
cash_wait Waiting for payment in kiosk
hold_wait Amount was successfully blocked on the sender's account
invoice_wait Invoice is created successfully, waiting for a payment
prepared Payment is created, waiting for customer to finish it
processing Payment is processing
wait_accept Money are withdrawn from client but the store is still not verified. If the store is not activated for 90 days, payment will be automatically cancelled
wait_card Recipient didn't set the compensation method
wait_compensation Payment is successful, it will be transferred in daily settlement
wait_lc Protected payment. Charging is successful, waiting for receipt of goods confirmation
wait_reserve Funds are reserved to make a refund according to a refund request
wait_secure Payment is verified
token String Payment token
type String Payment type
version Number Version API. Present value - 3
err_erc String Error code
product_category String Product category in your shop
product_description String Product description
product_name String Product name in your shop
product_url String Product page address
refund_amount Number Refund amount
verifycode String Verification code