Private
Company editing
Data editing of created in LiqPay company

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\" : \"agent_shop_edit\",
    \"version\" : 3,
    \"public_key\" : \"${PUBLIC_KEY}\", 
    \"merchant_public_key\" : \"i3111000000\", 
    \"phone\" : \"380950000001\",
    \"order_id\" : \"order_id_1\",
    \"card\" : \"4731195301524634\",
    \"card_exp_month\" : \"03\",
    \"card_exp_year\" : \"22\",
    \"card_cvv\" : \"111\",
    \"site\" : \"agent1.site.com\",
    \"description\" : \"site description\",
    \"email\" : \"email@gmail.com\",
    \"name\" : \"Site name\"
}"
# 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'              => 'agent_shop_edit',
'version'             => '3',
'phone'               => '380950000001',
'site'                => 'agent1.site.com',
'description'         => 'site description',
'email'               => 'email@gmail.com',
'name'                => 'Site name',
'card'                => '4731195301524634',
'card_exp_month'      => '03',
'card_exp_year'       => '22',
'card_cvv'            => '111',
'merchant_public_key' => 'i3111000000'
));
HashMap<String, String> params = new HashMap<String, String>();
params.put("action", "agent_shop_edit");
params.put("version", "3");
params.put("phone", "380950000001");
params.put("site", "agent1.site.com");
params.put("description", "site description");
params.put("email", "email@gmail.com");
params.put("name", "Site name");  
params.put("card", "4731195301524634");
params.put("card_exp_month", "03");
params.put("card_exp_year", "22");
params.put("card_cvv", "111");
params.put("merchant_public_key", "i3111000000");

LiqPay liqpay = new LiqPay(PUBLIC_KEY, PRIVATE_KEY);
HashMap<String, Object> res = liqpay.api("request", params);    
System.out.println(res.get("result"));
from liqpay import LiqPay

liqpay = LiqPay(public_key, private_key)
res = liqpay.api("request", {
"action"              : "agent_shop_edit",
"version"             : "3",
"phone"               : "380950000001",
"site"                : "agent1.site.com",
"description"         : "site description",
"email"               : "email@gmail.com",
"name"                : "Site name",
"card"                : "4731195301524634",
"card_exp_month"      : "03",
"card_exp_year"       : "22",
"card_cvv"            : "111",
"merchant_public_key" : "i3111000000"
})
liqpay = Liqpay::Liqpay.new(
:public_key  => 'public_key',
:private_key => 'private_key'
)
res = liqpay.api("request", {
:action              => "agent_shop_edit",
:version             => "3", 
:phone               => "380950000001",    
:site                => "agent1.site.com",
:description         => "site description",
:email               => "email@gmail.com",
:name                => "Site name",
:card                => "4731195301524634",
:card_exp_month      => "03",
:card_exp_year       => "22",
:card_cvv            => "111",
:merchant_public_key => "i3111000000"
})
LiqPay = liqpay:init(PublicKey, PrivateKey),
Res = liqpay:api("request", [
{<<"action">>,              <<"agent_shop_edit">>},
{<<"version">>,             <<"3">>}, 
{<<"phone">>,               <<"380950000001">>}, 
{<<"site">>,                <<"agent1.site.com">>}, 
{<<"description">>,         <<"site description">>}, 
{<<"email">>,               <<"email@gmail.com">>}, 
{<<"name">>,                <<"Site name">>}, 
{<<"card">>,                <<"4731195301524634">>}, 
{<<"card_exp_month">>,      <<"03">>}, 
{<<"card_exp_year">>,       <<"22">>}, 
{<<"card_cvv">>,            <<"111">>},
{<<"merchant_public_key">>, <<"i3111000000">>}
], LiqPay).
var LiqPay = require('liqpay');
var liqpay = new LiqPay(public_key, private_key);
liqpay.api("request", {
"action"              : "agent_shop_edit",
"version"             : "3",
"phone"               : "380950000001",
"site"                : "agent1.site.com",
"description"         : "site description",
"email"               : "email@gmail.com",
"name"                : "Site name",
"card"                : "4731195301524634",
"card_exp_month"      : "03",
"card_exp_year"       : "22",
"card_cvv"            : "111"
"merchant_public_key" : "i3111000000"
}, function( json ){
console.log( json.result );
});
my $liqpay = Liqpay->new($public_key,$private_key);
my $res = $liqpay->api("request",
{
'action'              => 'agent_shop_edit',
'version'             => '3',  
'phone'               => '380950000001',     
'site'                => 'agent1.site.com',
'description'         => 'site description',
'email'               => 'email@gmail.com',
'name'                => 'Site name',
'card'                => '4731195301524634',
'card_exp_month'      => '03',
'card_exp_year'       => '22',
'card_cvv'            => '111',
'merchant_public_key' => 'i3111000000'
}
);
Init("my_public_key", "my_private_key")
Api("request", map[string]interface{}{
    "action": "agent_shop_edit",
    "version": 3,
    "public_key": "PublicKey", 
    "merchant_public_key": "i3111000000",
    "phone": "380950000001",
    "card": "4731195301524634",
    "card_exp_month": "03",
    "card_exp_year": "22",
    "card_cvv": "111",
    "site": "agent1.site.com",
    "description": "site description",
    "email": "email@gmail.com",
    "name": "Site name",
})
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 agent_shop_edit
card Required* String Card number to receive payments in this store
card_cvv Required* String CVV/CVV2
card_exp_month Required* String Expiry month of the card
card_exp_year Required* String Expiry year of the card
description Required String Store description
email Required String Store email
merchant_public_key Required String Public_key of agent shop
name Required String Store name
phone Required String Shop phone number
site Required String Store URL
iban Required** String IBAN to receive payments in this store. Maximum length 34 symbols
company Required** String Account name
okpo Required** String OKPO account
amount_procent_agent Optional Number Agent fee in %
amount_static_agent Optional* Number Agent static fee
currency_static_agent Optional* String Currency of agent static fee
can_reports Optional String Allows the owner of the main company to view the payment history of the created company, pass the value true
can_checkout_edit Optional String Allows the owner of the main company to edit the payment page settings of the company created, pass the value true
logo Optional String URL shop logo
public_phone Optional String Shop public phone number
Example response:
{
"status": "success",
"public_key": "i000000000",
"private_key": "wGsqoko5412LcD0vB215XK2wQSgLDVBrsaPIRi6"
}
Response parameters
Parameter Type Description
private_key String Company private_key
public_key String Shop public key
status String Payment status.
Available values:
Final payment statuses
error Failed payment. Data is incorrect
failure Failed payment
success Successful payment
Statuses that required payment confirmation
3ds_verify 3DS verification is required.
To finish the payment you will require a 3ds_verify
cvv_verify Sender's card CVV is required.
To finish the payment you will require a cvv_verify
otp_verify OTP confirmation is required. OTP is sent to a customer phone number.
To finish the payment it is required otp_verify