Payouts
$pg_merchant_id = {{paybox_merchant_id}};
$secret_key = {{paybox_merchant_secret}};
$request = [
'pg_merchant_id'=> $pg_merchant_id,
'pg_amount' => 10,
'pg_order_id'=> 1234,
'pg_description' => 'Payment description',
'pg_post_link' => 'http://site.kz/post',
'pg_back_link' => 'http://site.kz/back',
'pg_order_time_limit' => '2020-12-31 12:00:00',
'pg_salt' => 'some random string',
];
//generate a signature and add it to the array
ksort($request); // sort alphabetically
array_unshift($request, 'reg2nonreg');
array_push($request, $secret_key);
$request['pg_sig'] = md5(implode(';', $request)); // signature
unset($request[0], $request[1]);
curl --location --request POST 'https://api.freedompay.kz/get_status2.php' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_order_id=00102' \
--form 'pg_salt=ijoi894j4ik39lo9' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'get_status2.php;{{paybox_merchant_id}};4567617;00102;{{secret_key}}'
<?xml version="1.0" encoding="utf-8"?>
<response>
<pg_status>ok</pg_status>
<pg_payment_id>4567617</pg_payment_id>
<pg_transaction_status>partial</pg_transaction_status>
<pg_can_reject>0</pg_can_reject>
<pg_testing_mode>1</pg_testing_mode>
<pg_captured>0</pg_captured>
<pg_create_date>2020-05-21 18:44:21</pg_create_date>
<pg_salt>u1aHmP4QyTxUqzXz</pg_salt>
<pg_sig>574a9d2e4783cb3d5ea443e1cc4f9434</pg_sig>
</response>
curl --location --request POST 'https://api.freedompay.kz/get_status2.php' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_order_id=00102' \
--form 'pg_salt=ijoi894j4ik39lo9' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'get_status2.php;{{paybox_merchant_id}};4567775;00102;{{secret_key}}'
<?xml version="1.0" encoding="utf-8"?>
<response>
<pg_status>ok</pg_status>
<pg_payment_id>511194</pg_payment_id>
<pg_transaction_status>ok</pg_transaction_status>
<pg_can_reject>0</pg_can_reject>
<pg_captured>1</pg_captured>
<pg_create_date>2021-08-26 11:52:25</pg_create_date>
<pg_salt>41F5ZyqcOabTG5u7</pg_salt>
<pg_sig>34484775bd62986753429d6af57e94eb</pg_sig>
</response>
curl --location --request POST 'https://api.freedompay.kz/get_status2.php' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_order_id=00102' \
--form 'pg_salt=ijoi894j4ik39lo9' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'get_status2.php;{{paybox_merchant_id}};4567775;00102;{{secret_key}}'
<?xml version="1.0" encoding="utf-8"?>
<response>
<pg_status>ok</pg_status>
<pg_payment_id>511194</pg_payment_id>
<pg_transaction_status>ok</pg_transaction_status>
<pg_can_reject>0</pg_can_reject>
<pg_captured>1</pg_captured>
<pg_create_date>2021-08-26 11:52:25</pg_create_date>
<pg_salt>41F5ZyqcOabTG5u7</pg_salt>
<pg_sig>34484775bd62986753429d6af57e94eb</pg_sig>
</response>
curl --location --request POST 'https://api.freedompay.kz/get_status2.php' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_order_id=00102' \
--form 'pg_salt=ijoi894j4ik39lo9' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'get_status2.php;{{paybox_merchant_id}};4567775;00102;{{secret_key}}'
<?xml version="1.0" encoding="utf-8"?>
<response>
<pg_status>ok</pg_status>
<pg_payment_id>511180</pg_payment_id>
<pg_transaction_status>failed</pg_transaction_status>
<pg_can_reject>0</pg_can_reject>
<pg_captured>0</pg_captured>
<pg_create_date>2021-08-26 11:53:12</pg_create_date>
<pg_failure_code>5</pg_failure_code>
<pg_failure_description>Transaction declined</pg_failure_description>
<pg_salt>VeJEycvwsTn74VEA</pg_salt>
<pg_sig>aa65c7786f5cba0cd9e6a452bfbcc7a2</pg_sig>
</response>
curl --location --request POST 'https://api.freedompay.kz/get_status2.php' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_order_id=00102' \
--form 'pg_salt=ijoi894j4ik39lo9' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'get_status2.php;{{paybox_merchant_id}};4567775;00102;{{secret_key}}'
<?xml version="1.0" encoding="utf-8"?>
<response>
<pg_status>error</pg_status>
<pg_error_code>340</pg_error_code>
<pg_error_description>Transaction not found</pg_error_description>
</response>
$pg_merchant_id = {{paybox_merchant_id}};
$secret_key = {{paybox_merchant_secret}};
$request = [
'pg_merchant_id'=> $pg_merchant_id,
'pg_order_id' => 12345,
'pg_salt' => 'some random string',
];
//generate a signature and add it to the array
ksort($request); // sort alphabetically
array_unshift($request, 'get_status2.php');
array_push($request, $secret_key);
$request['pg_sig'] = md5(implode(';', $request)); // signature
unset($request[0], $request[1]);
$pg_merchant_id = {{paybox_merchant_id}};
$secret_key = {{paybox_merchant_secret}};
$request = [
'pg_merchant_id'=> $pg_merchant_id,
'pg_amount' => 10,
'pg_order_id'=> 1234,
'pg_user_id' => 1234,
'pg_card_id_to' => 1234,
'pg_card_token_to' => 'c92741d9-ddd7-4bad-abd0-5594a79eea1a',
'pg_description' => 'Payment description',
'pg_post_link' => 'http://site.kz/post',
'pg_back_link' => 'http://site.kz/back',
'pg_order_time_limit' => '2020-12-31 12:00:00',
'pg_salt' => 'some random string',
];
//generate a signature and add it to the array
ksort($request); // sort alphabetically
array_unshift($request, 'reg2reg');
array_push($request, $secret_key);
$request['pg_sig'] = md5(implode(';', $request)); // signature
unset($request[0], $request[1]);
curl --location --request POST 'https://api.freedompay.kz/get_status2.php' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_order_id=00102' \
--form 'pg_salt=ijoi894j4ik39lo9' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'get_status2.php;{{paybox_merchant_id}};4567617;00102;{{secret_key}}'
<?xml version="1.0" encoding="utf-8"?>
<response>
<pg_status>ok</pg_status>
<pg_payment_id>4567617</pg_payment_id>
<pg_transaction_status>partial</pg_transaction_status>
<pg_can_reject>0</pg_can_reject>
<pg_testing_mode>1</pg_testing_mode>
<pg_captured>0</pg_captured>
<pg_create_date>2020-05-21 18:44:21</pg_create_date>
<pg_salt>u1aHmP4QyTxUqzXz</pg_salt>
<pg_sig>574a9d2e4783cb3d5ea443e1cc4f9434</pg_sig>
</response>
curl --location --request POST 'https://api.freedompay.kz/get_status2.php' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_order_id=00102' \
--form 'pg_salt=ijoi894j4ik39lo9' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'get_status2.php;{{paybox_merchant_id}};4567775;00102;{{secret_key}}'
<?xml version="1.0" encoding="utf-8"?>
<response>
<pg_status>ok</pg_status>
<pg_payment_id>511194</pg_payment_id>
<pg_transaction_status>ok</pg_transaction_status>
<pg_can_reject>0</pg_can_reject>
<pg_captured>1</pg_captured>
<pg_create_date>2021-08-26 11:52:25</pg_create_date>
<pg_salt>41F5ZyqcOabTG5u7</pg_salt>
<pg_sig>34484775bd62986753429d6af57e94eb</pg_sig>
</response>
curl --location --request POST 'https://api.freedompay.kz/get_status2.php' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_order_id=00102' \
--form 'pg_salt=ijoi894j4ik39lo9' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'get_status2.php;{{paybox_merchant_id}};4567775;00102;{{secret_key}}'
<?xml version="1.0" encoding="utf-8"?>
<response>
<pg_status>ok</pg_status>
<pg_payment_id>511194</pg_payment_id>
<pg_transaction_status>ok</pg_transaction_status>
<pg_can_reject>0</pg_can_reject>
<pg_captured>1</pg_captured>
<pg_create_date>2021-08-26 11:52:25</pg_create_date>
<pg_salt>41F5ZyqcOabTG5u7</pg_salt>
<pg_sig>34484775bd62986753429d6af57e94eb</pg_sig>
</response>
curl --location --request POST 'https://api.freedompay.kz/get_status2.php' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_order_id=00102' \
--form 'pg_salt=ijoi894j4ik39lo9' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'get_status2.php;{{paybox_merchant_id}};4567775;00102;{{secret_key}}'
<?xml version="1.0" encoding="utf-8"?>
<response>
<pg_status>ok</pg_status>
<pg_payment_id>511180</pg_payment_id>
<pg_transaction_status>failed</pg_transaction_status>
<pg_can_reject>0</pg_can_reject>
<pg_captured>0</pg_captured>
<pg_create_date>2021-08-26 11:53:12</pg_create_date>
<pg_failure_code>5</pg_failure_code>
<pg_failure_description>Transaction declined</pg_failure_description>
<pg_salt>VeJEycvwsTn74VEA</pg_salt>
<pg_sig>aa65c7786f5cba0cd9e6a452bfbcc7a2</pg_sig>
</response>
curl --location --request POST 'https://api.freedompay.kz/get_status2.php' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_order_id=00102' \
--form 'pg_salt=ijoi894j4ik39lo9' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'get_status2.php;{{paybox_merchant_id}};4567775;00102;{{secret_key}}'
<?xml version="1.0" encoding="utf-8"?>
<response>
<pg_status>error</pg_status>
<pg_error_code>340</pg_error_code>
<pg_error_description>Transaction not found</pg_error_description>
</response>
$pg_merchant_id = {{paybox_merchant_id}};
$secret_key = {{paybox_merchant_secret}};
$request = [
'pg_merchant_id'=> $pg_merchant_id,
'pg_order_id' => 12345,
'pg_salt' => 'some random string',
];
//generate a signature and add it to the array
ksort($request); // sort alphabetically
array_unshift($request, 'get_status2.php');
array_push($request, $secret_key);
$request['pg_sig'] = md5(implode(';', $request)); // signature
unset($request[0], $request[1]);
<?xml version="1.0" encoding="UTF-8"?>
<pg_status>ok</pg_status>
curl --location --request POST 'https://api.freedompay.kz/get_status2.php' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_order_id=00102' \
--form 'pg_salt=ijoi894j4ik39lo9' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'get_status2.php;{{paybox_merchant_id}};4567775;00102;{{secret_key}}'
<?xml version="1.0" encoding="utf-8"?>
<response>
<pg_status>ok</pg_status>
<pg_payment_id>511194</pg_payment_id>
<pg_transaction_status>ok</pg_transaction_status>
<pg_can_reject>0</pg_can_reject>
<pg_captured>1</pg_captured>
<pg_create_date>2021-08-26 11:52:25</pg_create_date>
<pg_salt>41F5ZyqcOabTG5u7</pg_salt>
<pg_sig>34484775bd62986753429d6af57e94eb</pg_sig>
</response>
curl --location --request POST 'https://api.freedompay.kz/get_status2.php' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_order_id=00102' \
--form 'pg_salt=ijoi894j4ik39lo9' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'get_status2.php;{{paybox_merchant_id}};4567775;00102;{{secret_key}}'
<?xml version="1.0" encoding="utf-8"?>
<response>
<pg_status>ok</pg_status>
<pg_payment_id>511194</pg_payment_id>
<pg_transaction_status>ok</pg_transaction_status>
<pg_can_reject>0</pg_can_reject>
<pg_captured>1</pg_captured>
<pg_create_date>2021-08-26 11:52:25</pg_create_date>
<pg_salt>41F5ZyqcOabTG5u7</pg_salt>
<pg_sig>34484775bd62986753429d6af57e94eb</pg_sig>
</response>
curl --location --request POST 'https://api.freedompay.kz/get_status2.php' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_order_id=00102' \
--form 'pg_salt=ijoi894j4ik39lo9' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'get_status2.php;{{paybox_merchant_id}};4567775;00102;{{secret_key}}'
<?xml version="1.0" encoding="utf-8"?>
<response>
<pg_status>ok</pg_status>
<pg_payment_id>511180</pg_payment_id>
<pg_transaction_status>failed</pg_transaction_status>
<pg_can_reject>0</pg_can_reject>
<pg_captured>0</pg_captured>
<pg_create_date>2021-08-26 11:53:12</pg_create_date>
<pg_failure_code>5</pg_failure_code>
<pg_failure_description>Transaction declined</pg_failure_description>
<pg_salt>VeJEycvwsTn74VEA</pg_salt>
<pg_sig>aa65c7786f5cba0cd9e6a452bfbcc7a2</pg_sig>
</response>
$pg_merchant_id = {{paybox_merchant_id}};
$secret_key = {{paybox_merchant_secret}};
$request = [
'pg_merchant_id'=> $pg_merchant_id,
'pg_order_id' => 12345,
'pg_salt' => 'some random string',
];
//generate a signature and add it to the array
ksort($request); // sort alphabetically
array_unshift($request, 'get_status2.php');
array_push($request, $secret_key);
$request['pg_sig'] = md5(implode(';', $request)); // signature
unset($request[0], $request[1]);
curl --location --request POST 'https://api.freedompay.kz/api/cbc/check' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_phone=7073175200' \
--form 'pg_amount=2000' \
--form 'pg_order_id=00102' \
--form 'pg_post_link=http://site.kz/post' \
--form 'pg_salt=some random string' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'check;2000;{{paybox_merchant_id}};00102;7073175200;some random string;{{secret_key}}'
<?xml version="1.0" encoding="UTF-8"?>
<response>
<pg_payment_id>765432</pg_payment_id>
<pg_merchant_id>500001</pg_merchant_id>
<pg_order_id>1234</pg_order_id>
<pg_status>ok</pg_status>
<pg_salt>yNSdZrM1pIA4NjRU5Csdm0L3NC92PZpo</pg_salt>
<pg_sig>6304300d2a1d5d35cfbdc37ae8490c81</pg_sig>
</response>
curl --location --request POST 'https://api.freedompay.kz/api/cbc/check' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_phone=7073175200' \
--form 'pg_amount=2000' \
--form 'pg_order_id=00102' \
--form 'pg_post_link=http://site.kz/post' \
--form 'pg_salt=some random string' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'check;2000;{{paybox_merchant_id}};00102;7073175200;some random string;{{secret_key}}'
<?xml version="1.0" encoding="UTF-8"?>
<response>
<pg_status>error</pg_status>
<pg_error_code>101</pg_error_code>
<pg_error_description>Empty merchant</pg_error_description>
<pg_salt>yNSdZrM1pIA4NjRU5Csdm0L3NC92PZpo</pg_salt>
<pg_sig>6304300d2a1d5d35cfbdc37ae8490c81</pg_sig>
</response>
$pg_merchant_id = {{paybox_merchant_id}};
$secret_key = {{paybox_merchant_secret}};
$request = [
'pg_merchant_id' => $pg_merchant_id,
'pg_phone' => '7073175200',
'pg_amount' => '2000',
'pg_order_id' => '00102',
'pg_post_link' => 'http://site.kz/post',
'pg_salt' => 'some random string'
];
//generate a signature and add it to the array
ksort($request); // sort alphabetically
array_unshift($request, 'check');
array_push($request, $secret_key);
$request['pg_sig'] = md5(implode(';', $request)); // signature
unset($request[0], $request[1]);
curl --location --request POST 'https://api.freedompay.kz/api/cbc/exec' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_payment_id=486456456' \
--form 'pg_salt=some random string' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'exec;{{paybox_merchant_id}};486456456;some random string;{{secret_key}}'
<?xml version="1.0" encoding="UTF-8"?>
<response>
<pg_payment_id>765432</pg_payment_id>
<pg_merchant_id>500001</pg_merchant_id>
<pg_status>ok</pg_status>
<pg_salt>yNSdZrM1pIA4NjRU5Csdm0L3NC92PZpo</pg_salt>
<pg_sig>6304300d2a1d5d35cfbdc37ae8490c81</pg_sig>
</response>
curl --location --request POST 'https://api.freedompay.kz/api/cbc/exec' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_payment_id=486456456' \
--form 'pg_salt=some random string' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'exec;{{paybox_merchant_id}};486456456;some random string;{{secret_key}}'
<?xml version="1.0" encoding="UTF-8"?>
<response>
<pg_status>error</pg_status>
<pg_error_code>101</pg_error_code>
<pg_error_description>Empty merchant</pg_error_description>
<pg_salt>yNSdZrM1pIA4NjRU5Csdm0L3NC92PZpo</pg_salt>
<pg_sig>6304300d2a1d5d35cfbdc37ae8490c81</pg_sig>
</response>
$pg_merchant_id = {{paybox_merchant_id}};
$secret_key = {{paybox_merchant_secret}};
$request = [
'pg_merchant_id' => $pg_merchant_id,
'pg_phone' => '7073175200',
'pg_amount' => '2000',
'pg_order_id' => '00102',
'pg_salt' => 'some random string'
];
//generate a signature and add it to the array
ksort($request); // sort alphabetically
array_unshift($request, 'exec');
array_push($request, $secret_key);
$request['pg_sig'] = md5(implode(';', $request)); // signature
unset($request[0], $request[1]);
curl --location --request POST 'https://api.freedompay.kz/api/cbc/status' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_payment_id=486456456' \
--form 'pg_salt=some random string' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'status;{{paybox_merchant_id}};486456456;some random string;{{secret_key}}'
<?xml version="1.0" encoding="UTF-8"?> <response>
<pg_payment_id>765432</pg_payment_id>
<pg_merchant_id>500001</pg_merchant_id>
<pg_order_id>1234</pg_order_id>
<pg_status>success</pg_status>
<pg_salt>yNSdZrM1pIA4NjRU5Csdm0L3NC92PZpo</pg_salt>
<pg_sig>6304300d2a1d5d35cfbdc37ae8490c81</pg_sig>
</response>
curl --location --request POST 'https://api.freedompay.kz/api/cbc/status' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_payment_id=486456456' \
--form 'pg_salt=some random string' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'status;{{paybox_merchant_id}};486456456;some random string;{{secret_key}}'
<?xml version="1.0" encoding="UTF-8"?> <response>
<pg_payment_id>765432</pg_payment_id>
<pg_merchant_id>500001</pg_merchant_id>
<pg_order_id>1234</pg_order_id>
<pg_status>process</pg_status>
<pg_salt>yNSdZrM1pIA4NjRU5Csdm0L3NC92PZpo</pg_salt>
<pg_sig>6304300d2a1d5d35cfbdc37ae8490c81</pg_sig>
</response>
curl --location --request POST 'https://api.freedompay.kz/api/cbc/status' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_payment_id=486456456' \
--form 'pg_salt=some random string' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'status;{{paybox_merchant_id}};486456456;some random string;{{secret_key}}'
<?xml version="1.0" encoding="UTF-8"?>
<response>
<pg_status>error</pg_status>
<pg_error_code>75</pg_error_code>
<pg_error_description> Transfer execution time expired, recipient did not withdraw money</pg_error_description>
<pg_salt>yNSdZrM1pIA4NjRU5Csdm0L3NC92PZpo</pg_salt>
<pg_sig>6304300d2a1d5d35cfbdc37ae8490c81</pg_sig>
</response>
$pg_merchant_id = {{paybox_merchant_id}};
$secret_key = {{paybox_merchant_secret}};
$request = [
'pg_merchant_id' => $pg_merchant_id,
'pg_phone' => '7073175200',
'pg_amount' => '2000',
'pg_order_id' => '00102',
'pg_salt' => 'some random string'
];
//generate a signature and add it to the array
ksort($request); // sort alphabetically
array_unshift($request, 'exec');
array_push($request, $secret_key);
$request['pg_sig'] = md5(implode(';', $request)); // signature
unset($request[0], $request[1]);
curl --location --request POST 'https://api.freedompay.kz/api/balance_status' \
--form 'pg_merchant_id={{paybox_merchant_id}}' \
--form 'pg_salt=some random string' \
--form 'pg_sig={{paybox_signature}}'
# Signature example:
'balance_status;{{paybox_merchant_id}};some random string;{{secret_key}}'
<?xml version="1.0" encoding="UTF-8"?>
<response>
<pg_balance>0.00</pg_balance>
<pg_status>ok</pg_status>
<pg_salt>osWRT1FtWr</pg_salt>
<pg_sig>9087fd0c7a26334f53f83f0bd61e6b80</pg_sig>
</response>
$pg_merchant_id = {{paybox_merchant_id}};
$secret_key = {{paybox_merchant_secret}};
$request = [
'pg_merchant_id' => $pg_merchant_id,
'pg_salt' => 'some random string'
];
//generate a signature and add it to the array
ksort($request); // sort alphabetically
array_unshift($request, 'balance_status');
array_push($request, $secret_key);
$request['pg_sig'] = md5(implode(';', $request)); // signature
unset($request[0], $request[1]);