Public
Registers
Getting registry of received payments for companies with compensation by a separate transactions and once a day


Forming a request to API for self-integration:
Example of using SDK:
#!/bin/bash
PUBLIC_KEY='your_public_key'
PRIVATE_KEY='your_private_key'
API_URL='https://www.liqpay.ua/api/request'
JSON="{ 
	\"action\" : \"register\",
    \"version\" : 3,
    \"public_key\" : \"${PUBLIC_KEY}\", 
    \"format\" : \"json\",
    \"date\" : \"2017-01-31\"
}"
# DATA is base64_encode result from JSON string
DATA=$(echo -n ${JSON} | base64)
# SIGNATURE is base64 encode result from sha1 binary hash from concatenate string ${PRIVATE_KEY}${DATA}${PRIVATE_KEY}
SIGNATURE=$(echo -n "${PRIVATE_KEY}${DATA}${PRIVATE_KEY}" | openssl dgst -binary -sha1 | base64)
# REQ is json response from liqpay
REQ=$(curl --silent -XPOST ${API_URL} --data-urlencode data="${DATA}" --data-urlencode signature="${SIGNATURE}")
echo "Result: ${REQ}"
$liqpay = new LiqPay($public_key, $private_key);
$res = $liqpay->api("request", array(
'action'    => 'register',
'version'   => '3',
'format'    => 'json',
'date'      => '2017-01-31'
));
HashMap<String, String> params = new HashMap<String, String>();
params.put("action", "register");
params.put("version", "3");
params.put("format", "json");
params.put("date", "2017-01-31");

LiqPay liqpay = new LiqPay(PUBLIC_KEY, PRIVATE_KEY);
HashMap<String, Object> res = liqpay.api("request", params);		
System.out.println(res.get("status"));
from liqpay import LiqPay
liqpay = LiqPay(public_key, private_key)
res = liqpay.api("request", {
"action"    : "register",
"version"   : "3",
"format"    : "json",
"date"      : "2017-01-31"
})
liqpay = Liqpay::Liqpay.new(
:public_key  => 'public_key',
:private_key => 'private_key'
)
res = liqpay.api("request", {
:action    => "register",
:version   => "3",
:format    => "json",
:date      => "2017-01-31"
})
LiqPay = liqpay:init(PublicKey, PrivateKey),
Res = liqpay:api("request", [
{<<"action">>,    <<"register">>},
{<<"version">>,   <<"3">>},
{<<"format">>,    <<"json">>},
{<<"date">>,      <<"2017-01-31">>}
], LiqPay)
var LiqPay = require('liqpay');
var liqpay = new LiqPay(public_key, private_key);
liqpay.api("request", {
"action"    : "register",
"version"   : "3",
"format"    : "json",
"date"      : "2017-01-31"
}, function( json ){
console.log( json.status );
});
my $liqpay = Liqpay->new($public_key,$private_key);
my $res = $liqpay->api("request",
{
'action'    => 'register',
'version'   => '3',
'format'    => 'json',
'date'      => '2017-01-31'
}
);
Init("my_public_key", "my_private_key")
Api("request", map[string]interface{}{
    "action": "register",
    "version": 3,
    "public_key": PublicKey,
    "format": "json",
    "date": "2017-01-31",
})
Options for generating data:
Main
Parameter Required Type Description
version Required Number Version API. Current value - 3
public_key Required String Public key - the store identifier. You can get the key in the store settings
action Required String register
format Required String Possible report format json, csv, xml
date Required String Date for which the registry will be uploaded
Example response:
{
  "result": "ok",
  "data": [{
  "id": 107866,
  "create_date": "2017-01-31 07:51:37",
  "end_date": "2017-01-31 07:51:54",
  "trans_type": "purchase",
  "trans_amount": 1.0,
  "trans_fee_debit": 0.0,
  "trans_fee_credit": 0.03,
  "trans_bonus": 0.0,
  "trans_total": 0.97,
  "trans_currency": "UAH",
  "action": "pay",
  "channel": "checkout",
  "paytype": "liqpay",
  "order_id": "98R1U1OV1485849059893399",
  "liqpay_order_id": "J4L8IRG81485849105029639",
  "authcode_debit": "784593",
  "description": "My product",
  "ip": "8.8.8.8",
  "customer": null,
  "bonus_type": null,
  "sender_card": "5168 **** **** **16",
  "sender_card_bank": "pb",
  "sender_card_country": 804,
  "sender_card_type": "mc",
  "sender_phone": "380950000001",
  "sender_email": null,
  "sender_first_name": "test",
  "sender_last_name": "test",
  "sender_card_product_type": "KDV"
  }]
}
Response parameters
Parameter Type Description
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
authcode_debit String Authorization code for transaction of debit
bonus_type String Bonus type, possible values ​​of bonusplus, discount_club, personal, promo
channel String Payment channel, possible values checkout, checkoutjs, api
create_date String Date of payment creation
customer String Unique customer ID in your shop. Max length 100 symbols
description String Payment description
end_date String Date of payment edition/end
id Number Payment id in LiqPay system
ip String sender's IP address
liqpay_order_id String Payment order_id in LiqPay system
order_id String Order_id payment
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.
sender_card String Sender's card
sender_card_bank String Sender's card bank
sender_card_country String Sender's card country. Digital ISO 3166-1 code
sender_card_product_type String Type of card product
sender_card_type String Sender's card type MC/Visa
sender_email String Email payer
sender_first_name String The name of the sender
sender_last_name String sender's last name
sender_phone String Sender's phone number
trans_amount Number The amount of the transaction
trans_bonus Number The amount of the bonus for the transaction
trans_currency String Transaction currency
trans_fee_credit Number The amount of the loan transaction commission
trans_fee_debit Number The amount of the debit transaction commission
trans_total Number The amount of reimbursement of the company
trans_type String Transaction type. Possible values reverse, hold_compl, purchase, refund