This section describes the mechanics when FreedomPay pays money to the user's bank card
Attention! Payments will be available for the store only after the permission of the personal manager and the application of the appropriate settings on the FreedomPay side
Payments cannot be test. Testing is carried out only by paying a certain amount to a real card
Payout by card number
Request URL POST https://api.freedompay.kz/g2g/p2p2nonreg
Test Request URL POST https://test-api.freedompay.kz/g2g/p2p2nonreg
Request fields
Name;Description;Type;
pg_merchant_id <p style="color:#d63384">required</p>;Merchant ID in FreedomPay;string
pg_order_id <p style="color:#d63384">required</p>;Order ID in the merchant system. A unique, monotonically increasing value is recommended. <br><span style="font-size:14px">Example: 1234</span>;string
pg_amount <p style="color:#d63384">required</p>;Transfer amount. Minimum 0.01<br><span style="font-size:14px">Example:100</span>;number
pg_payment_to <p style="color:#d63384">required</p>;Recipient's card number.<br><span style="font-size:14px">Example: 4405645000006150</span>;integer
pg_description <p style="color:#d63384">required</p>;Payment description<br><span style="font-size:14px">Example: Payment description</span>;string
pg_post_link <p style="color:#d63384">required</p>;Url to which payment status response is sent <br><span style="font-size:14px">Example: http://site.kz/post</span>;string
pg_salt <p style="color:#d63384">required</p>;A random string consisting of arbitrary numbers and Latin letters <br><span style="font-size:14px">Example: some random string</span>; string
pg_sig <p style="color:#d63384">required</p>;Request signature;string
pg_user_id; User ID in the merchant system <br><span style="font-size:14px">Example: 1234</span>;string
pg_card_name;Name and surname of card holder <br><span style="font-size:14px">Example: Ivan Ivanov</span>;string
pg_currency;Currency.<br><span style="font-size:14px">Example: KZT</span>;string
Response parameters
Title;Description;Type;
pg_payment_id;The unique identifier of the payment transaction in FreedomPay. Serves as a key for all further work with the transaction;integer
pg_merchant_id;Merchant ID in the FreedomPay system.;integer
pg_order_id;Order ID in the merchant system;string
pg_status;Payment status;string
pg_balance;Merchant's balance in the FreedomPay system;number
pg_payment_amount;Payment amount;number
pg_payment_date;Date and time of the payment;datetime
pg_salt;Random string consisting of arbitrary numbers and Latin letters;string
pg_sig;Request signature;string
pg_datetime; Date and time of the request; datetime
To a bank account (IBAN)
Payout to bank account KZT To use these requests, you should contact your manager.
Request URL POST https://api.freedompay.kz/g2g/to_iban
Test Request URL POST https://test-api.freedompay.kz/g2g/to_iban
Request fields
Name;Description;Type;
pg_amount <p style="color:#d63384">required</p>;Transfer amount. Minimum 0.01<br><span style="font-size:14px">Example: 10</span>;number
pg_merchant_id <p style="color:#d63384">required</p>;Merchant ID in FreedomPay;integer
pg_order_id <p style="color:#d63384">required</p>;Order ID in the merchant system. A unique, monotonically increasing value is recommended. <br><span style="font-size:14px">Example: 1234</span>;integer
pg_recipient_iban <p style="color:#d63384">required</p>;IBAN account number <br><span style="font-size:14px">Example: KZ123412341234123412</span>;string(20)
pg_recipient_iin <p style="color:#d63384">required</p>; Recipient IIN <br><span style="font-size:14px">Example: 761223455678</span>;integer(12)
pg_recipient_name <p style="color:#d63384">required</p>;Recipient name <br><span style="font-size:14px">Example: IVANOV IVAN </span>;string
pg_recipient_kbe <p style="color:#d63384">required</p>;Recipient kbe <br><span style="font-size:14px">Example: 19</span>;integer(2)
;if code starts with 1;no any additional parameters
;if code starts with 2;+additional field <p>pg_ben_country</p>;example =RU
;;+additional field <p>pg_ben_jurfl</p>;=0 individual,<p>=1 legal entity</p>
pg_knp <p style="color:#d63384">required</p>;Receiver's KNP <br><span style="font-size:14px">Example: 119 </span>;integer(3)
pg_bank_bik <p style="color:#d63384">required</p>;Receiver's BIC <br><span style="font-size:14px">Example: KZZSAE </span>;string(6)
pg_description;*Payment description <br><span style="font-size:14px">Example: Payment description </span>;string
pg_post_link <p style="color:#d63384">required</p>;Url to which payment status response is sent <br><span style="font-size:14px">Example: http://site.kz/post </span>;string
pg_salt <p style="color:#d63384">required</p>;A random string consisting of arbitrary numbers and Latin letters <br><span style="font-size:14px">Example: some random string</span>;string
pg_sig <p style="color:#d63384">required</p>;Request signature;string
Response parameters
Title;Description;Type;
pg_payment_id;The unique identifier of the payment transaction in FreedomPay. Serves as a key for all further work with the transaction;integer
pg_merchant_id;Merchant ID in the FreedomPay system.;integer
pg_status;Request Status;string
pg_order_id;Order ID in the merchant system;string
pg_payment_amount;Payment amount;number
pg_payment_date;Date and time of the payment;datetime
pg_salt;Random string consisting of arbitrary numbers and Latin letters;string
pg_sig;Request signature;string
pg_datetime;Date and time of the request;datetime
Post link on the merchant side must be public, without authorization.
Request URL POST {{post_link}}
Headers
Content-Type;Value
Content-Type;application/x-www-form-urlencoded
Request fields
Name;Description;Type;
pg_type;Transaction type;string
pg_payment_id;Transaction ID in the system FreedomPay.;integer
pg_order_id;Order ID in the merchant system;string
pg_status;The status of the operation. Enum:<span style="color:#d63384">ok, error</span>;string
pg_salt;A random string consisting of arbitrary numbers and Latin letters. <span style="font-size:14px">Example: some random string</span>;string
pg_sig;Request signature;string
Payment status
Request URL POST https://api.freedompay.kz/g2g/payout_status
Test Request URL POST https://test-api.freedompay.kz/g2g/payout_status
Request fields
Name;Description;Type;
pg_merchant_id <p style="color:#d63384">required</p>;Merchant ID in FreedomPay.;integer
pg_payment_id;Transaction ID in the system FreedomPay.;integer
pg_salt <p style="color:#d63384">required</p>;A random string consisting of arbitrary numbers and Latin letters;string
pg_sig <p style="color:#d63384">required</p>;Digital signature of the request;string
pg_order_id <p style="color:#d63384">required</p>;Order ID in the merchant system.;integer
Response parameters
Response parameters for a successful request:
Title;Validation;Description;
pg_payment_id;integer;transaction id in the system FreedomPay
pg_merchant_id; integer;merchant_id on the FreedomPay system
pg_status;string;Enum: "success" "error" "process". Transaction status. Process - this is an exceptional option only in the case when the bank answered incorrectly, and we did not finalize the status of the transfer on our side
pg_order_id;integer;Order number
pg_amount;integer;Transfer amount
pg_salt;string;Random string consisting of arbitrary numbers and Latin letters
pg_sig;string;Signature
pg_datetime;datetime;Date and time of the request
Payment status v2
Request URL POST https://api.freedompay.kz/g2g/payout_status2
Test Request URL POST https://test-api.freedompay.kz/g2g/payout_status2
Request fields
Name;Description;Type;
pg_merchant_id <p style="color:#d63384">required</p>;Merchant ID in FreedomPay.;integer
pg_payment_id;Transaction ID in the system FreedomPay.;integer
pg_salt <p style="color:#d63384">required</p>;A random string consisting of arbitrary numbers and Latin letters;string
pg_sig <p style="color:#d63384">required</p>;Digital signature of the request;string
pg_order_id <p style="color:#d63384">required</p>;Order ID in the merchant system.;integer
Response parameters
Response parameters for a successful request:
Title;Validation;Description;
pg_payment_id;integer;transaction id in the system FreedomPay
pg_merchant_id; integer;merchant_id on the FreedomPay system
pg_payment_status;string;Enum: "success" "error" "process". Transaction status. Process - this is an exceptional option only in the case when the bank answered incorrectly, and we did not finalize the status of the transfer on our side
pg_status;string;Request status
pg_order_id;integer;Order number
pg_amount;integer; Transfer amount
pg_salt;string;Random string consisting of arbitrary numbers and Latin letters
pg_sig;string;Signature
pg_datetime;datetime;Date and time of the request
Payout to saved card
To use these requests, you should contact your manager.
Request URL
POST https://api.freedompay.kz/g2g/reg2reg
Request fields
Name; Description; Type
pg_amount<p style="color:#d63384">required</p>;Transfer amount.<br>Minimum 0.01<p style="font-size:14px">Example: 10</p> ;number
pg_merchant_id<p style="color:#d63384">required</p>;Merchant ID in the FreedomPay system.; integer
pg_order_id<p style="color:#d63384">required</p>;Order ID in the merchant system. A unique, monotonically increasing value is recommended.<p style="font-size:14px">Example: order_1234</p>; string
pg_user_id<p style="color:#d63384">required</p>;User ID in the system .<p style="font-size:14px">Example: 1234</p>; integer
pg_card_token_to<p style="color:#d63384">required if no pg_card_id_to</p> ;Token of the card to transfer money to (returned when registering the card).<p style="font-size:14px">Example: c92741d9-ddd7-4bad-abd0-5594a79eea1a</p>; string
pg_description<p style="color:#d63384">required</p>;Payment description<p style="font-size:14px">Example: Payment Description</p>; string
pg_post_link<p style="color:#d63384">required</p>;Url to which payment status response is sent<p style="font-size:14px">Example: http://site.kz/post</p>; string
pg_order_time_limit<p style="color:#d63384">required</p>;Time limit for making a payment.<p style="font-size:14px">Example: 2020-12-31 12:00:00</p>; datetime
pg_salt<p style="color:#d63384">required</p>;A random string consisting of arbitrary numbers and Latin letters<p style="font-size:14px">Example: some random string</p>;string
pg_sig<p style="color:#d63384">required</p>;Request signature;string
Response parameters
Title ;Description; Type
pg_payment_id;The unique identifier of the payment transaction in Freedom Pay system. Serves as a key for all further work with the transaction;integer
pg_merchant_id;Merchant ID in the FreedomPay system.;integer
pg_status;Request status:<br>Status: — Description:<br>ok — Request completed successfully,<br>error — Request completed with an error,<br>process — Final payment status need;string
pg_order_id; Order ID in the merchant system; string
pg_balance; Merchant's balance in the Freedom Pay system; number
pg_card_hash; The card to which the payment was made; string
pg_card_token; Recipient's card ID; string
pg_payment_amount; Payment amount; number
pg_payment_date; Date and time of the payment ;datetime
pg_error_code; Error code ;integer
pg_error_description; Description of the error; string
pg_salt; Random string consisting of arbitrary numbers and Latin letters; string
pg_sig ;Request signature; string
Get balance
Request URL POST https://api.freedompay.kz/g2g/balance_status
Request fields
Name; Description; Type
pg_merchant_id<p style="color:#d63384">required</p>;Merchant ID in the FreedomPay system. ;integer
pg_currency; Balance currency<br>See section Currencies directory<p style="font-size:14px">Example: KZT</p>; string
pg_salt<p style="color:#d63384">required</p>;A random string consisting of arbitrary numbers and Latin letters<p style="font-size:14px">Example: some random string</p>; string
pg_sig<p style="color:#d63384">required</p>;Request signature; string
Response parameters
Title ;Description; Type
pg_balance; Balance; number
pg_status; Request Status; string
pg_currency; Balance currency; string
pg_salt; Random string consisting of arbitrary numbers and Latin letters; string
pg_sig; Request signature; string