Basic mechanics for saving cards. Further, the saved cards can be used both for payments and for payments. To use this request, you should contact your manager
Request URL POST https://api.freedompay.kz/g2g/cardstorage/add
Test Request URL POST https://test-api.freedompay.kz/g2g/cardstorage/add
Request fields
Title;Description;Type;
pg_merchant_id <p style="color:#d63384">required</p>;Merchant ID in the system FreedomPay;integer
pg_user_id <p style="color:#d63384">required</p>;User ID in the merchant system<br><span style="font-size:14px">Example:1234</span>;integer
pg_order_id;Order ID in the merchant system, unique value <br><span style="font-size:14px">Example:12345</span>;string
pg_card_name <p style="color:#d63384">required</p>;Name and surname of card holders. Letters (Latin), dash (-) and space <br><span style="font-size:14px">Example: TEST TESTOV</span>;string
pg_card_pan <p style="color:#d63384">required if no pg_card_token</p>;Card number <br><span style="font-size:14px">Example:4405645000006150</span>;string
pg_card_token <p style="color:#d63384">required if no pg_card_pan</p>;The card token for which you want to enrich the data. If the card was previously saved with the status is_sender=0 ;string
pg_card_cvc <p style="color:#d63384">required</p>;A three-digit card authentication code <br><span style="font-size:14px">Example: 653</span>;integer
pg_card_year <p style="color:#d63384">required</p>;Card expiration date (year) yy <br><span style="font-size:14px">Example: 25</span>;integer
pg_card_month <p style="color:#d63384">required</p>;Card expiration date (month) mm <br><span style="font-size:14px">Example: 09</span>;integer
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_order_id;Order ID in the merchant system;string
pg_card_token;Saved card token;string
pg_user_id;User ID in the merchant system;string
pg_status;Payment status;string
pg_3ds; Flag indicating the need to request 3ds. 1 - 3ds is set, 0 - no;number
pg_3d_acsurl;Card Issuer Bank Url for 3ds Validation;string
pg_salt;A random string consisting of arbitrary numbers and Latin letters <br><span style="font-size:14px">Example: some random string</span>;string
pg_sig;Request signature;string
Note. If 3ds is installed on the card, a request must be made to the ACS server of the card issuer's bank.
On this page the client enters his 3ds password. The server url can be obtained from the pg_3d_acsurl parameter.
Request parameters to the ACS server of the issuer's bank:
Title;Description
TermUrl;Url to which the answer will come in case of success
Adding a card with 3DSecure
Request URL POST https://api.freedompay.kz/g2g/cardstorage/payment_acs
Test Request URL POST https://test-api.freedompay.kz/g2g/cardstorage/payment_acs
Request fields
Title;Description;Type;
pg_merchant_id <p style="color:#d63384">required</p>;Merchant ID. Numbers;integer
pg_payment_id <p style="color:#d63384">required</p>;Transaction ID. Numbers;integer
pg_md <p style="color:#d63384">required</p>;Parameter from the response. ACS server of the issuer,card,Numbers and Latin letters; string
pg_pares <p style="color:#d63384">required</p>;Parameter from response.ACS server of issuer,card,Letters, numbers, dashes (-);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;Transaction ID;integer
pg_status;Payment status;string
pg_order_id;Order ID in the merchant system;string
pg_card_token;Saved card token;string
pg_reference; RRN operations;string
pg_salt;Random string;string
pg_sig;Request signature;string
In case of errors, there will be additional response parameters:
Title;Description;Type;
pg_error_code;Error code ID;string
pg_error_description;Text description of the error;string
Deleting a card
Request URL POST https://api.freedompay.kz/g2g/cardstorage/remove
Test Request URL POST https://test-api.freedompay.kz/g2g/cardstorage/remove
Request fields
Title;Description;Type;
pg_merchant_id <p style="color:#d63384">required</p>;Merchant ID in the system FreedomPay.;integer
pg_user_id <p style="color:#d63384">required</p>;User ID in the merchant system <br><span style="font-size:14px">Example: 1234</span>;integer
pg_card_token <p style="color:#d63384">required</p>;Saved card token <br><span style="font-size:14px">Example: ef741cfc-f85e-41a0-84e6-2ba964912182</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_status;Shows the result of the query;string
deleted_at;Card deletion date;datetime
pg_salt;Random string;string
pg_sig;Request signature;string
In case of errors, there will be additional response parameters:
Title;Description;Type;
pg_error_code;Error code ID;string
pg_error_description;Text description of the error;string
Getting a list of cards
Request URL POST https://api.freedompay.kz/g2g/cardstorage/list
Test Request URL POST https://test-api.freedompay.kz/g2g/cardstorage/list
Request fields
Title;Description;Type;
pg_merchant_id <p style="color:#d63384">required</p>;Merchant ID in the system FreedomPay;integer
pg_user_id <p style="color:#d63384">required</p>;User ID in the merchant system <br><span style="font-size:14px">User ID in the merchant system Example:1234</span>;integer
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
Object name;Parameter name;Description;Type
card;pg_status;Shows card status;string
—;pg_card_token;Card Token;string
—;pg_is_filled;Sign that the card can be used for debiting;integer
—;pg_card_hash;Masked PAN;string
—;created_at;Date the card was added;datetime
pg_salt;—;Random string;string
pg_sig;—;Request signature;string
In case of errors, there will be additional response parameters:
Title;Description;Type;
pg_error_code ; Error code ID;string
pg_error_description;Text description of the error;string
Directory of card statuses
Status;Description;
verified;The card can be used to send a transfer and receive a transfer
unverified;The card can be used to receive a transfer. The card can be used to send a transfer if pg_card_cvc, pg_card_year and pg_card_month are passed
deleted;The card has been removed and cannot be used
expired;The card is expired
blocked;The card is blocked