Freedom Pay
  1. Pay
Freedom Pay
  • Gateway API
    • Introduction
    • Reference
      • Test cards
      • Error codes
    • Sync API
      • Introduction
      • Page
        • Introduction
        • Page
        • Page with amount control
        • Status
      • Pay
        • Introduction
        • Card
          POST
        • 3DSecure
          POST
        • Cancel
          POST
        • Clearing
          POST
        • Refund
          POST
        • Status
          POST
      • Payout
        • Introduction
        • Card
        • IBAN
        • Balance
        • Status
        • StatusV2
      • Transfer
        • Introduction
        • Card
        • 3DSecure
        • Rates
        • Status
      • Card
        • Introduction
        • Add
        • 3DSecure
        • List
        • Remove
        • Status
      • Token
        • Introduction
        • Token Pay
        • Apple Pay
        • Google Pay
        • Samsung Pay
        • Token Payout
        • Status
    • Async API
      • Introduction
      • create
        • create payment
        • create payment recurrent
      • read
        • read payment
        • read request
      • edit
        • edit payment.refund
        • edit payment.reverse
        • edit payment.clearing
      • delete
  • Merchant API
    • Introduction
    • Reference
      • Test cards
      • Test phone numbers
      • Error codes
    • Page
      • Introduction
      • Page
      • Page with amount control
      • Payout page
      • Frame
      • Widget
      • Status
    • Pay
      • Introduction
      • Cancel
      • Clearing
      • Refund
      • Status
    • Payout
      • Introduction
      • IBAN
      • Balance
      • Status by order_id
      • Status by Payment ID
      • Status by Payment ID V2
    • Mobile balance
      • Introduction
      • Init
      • Pay
      • Approve
      • Resend code
      • Status
    • Card
      • Introduction
      • Add
      • Add for payout
      • Remove
      • List
      • Status
    • Token
      • Introduction
      • Saved card with CVC input (Init)
      • Saved card with CVC input (Pay)
      • Non-acceptance payments
      • Non-acceptance payments (Pay)
      • Token payout
      • Status
    • Invoice
      • Introduction
      • Init
      • Info
      • Pay
      • Status
    • Additional
      • Introduction
      • Check request
      • Result notify
      • Payout notify
      • Redirect back
  • Card API
    • Introduction
    • Payment Cards
      • Reference
        • Request Status
        • Client product
        • Card product
        • Card status
        • Card block
        • Transaction
        • Error codes
      • Card issue
        • Bulk
        • Single
        • Physical
      • Card control
        • Activate
        • Block
        • Unblock
        • Set PIN
        • Reset PIN counter
        • Close
        • Identification
        • Info
        • Balance
        • Secret data
        • Statement
      • Client
        • Create
        • Edit
        • Card list
      • Additional
        • Request status
    • Gift Cards
      • Introduction
      • Reference
        • Request status
        • Card status
      • List
      • Issue
      • Confirm
      • Resend
      • Resend code
      • Status
  • Partner API
    • Rates
      • Introduction
      • Rates
    • Products
      • Introduction
      • Reference
        • Request
        • Product
        • Freedom POS
        • Freedom ECOM
        • Freedom BOX
        • Limits
      • Add user
      • Add product
      • Add user with product
      • Grant user
      • Send auth data
      • Request status
    • E-Money
      • Introduction
      • Reference
        • Request
        • Operation
        • Error codes
      • Add
      • Owner identification
      • Info
      • Close
      • Block
      • Balance
      • Statement
      • Request Status
    • Freedom ID
      • Introduction
      • Android SDK
      • iOS SDK
      • Reference
        • Error codes
      • Link
      • Token
      • Token refresh
      • Info
      • Profile
      • Request
  • Mobile SDK
    • Payment SDK
      • iOS
      • Android
    • Freedom QR
      • Reader SDK (Android)
      • Provider SDK (Android)
  • CMS
    • Introduction
    • Get Merchant ID and key
    • WordPress
      • Introduction
      • Installation
      • Configuration
      • Test
      • Live payments
      • Update
    • Tilda
      • Introduction
      • Installation
      • Configuration
      • Test
      • Live payments
    • InSales
      • Introduction
      • Installation
      • Configuration
      • Test
      • Live payments
    • Ecwid
      • Introduction
      • Installation
      • Configuration
      • Test
      • Live payments
    • Bitrix
      • Introduction
      • Installation
      • Configuration
      • Test
      • Live payments
    • PrestaShop
      • Introduction
      • Installation
      • Configuration
      • Test
      • Live payments
    • OpenCart
      • Introduction
      • Installation
      • Configuration
      • Test
      • Live payments
  1. Pay

Card

POST
https://api.freedompay.uz/g2g/payment

Request

Body Params multipart/form-data
pg_amount
number 
required
Payment amount.||number
Example:
10
pg_currency
string 
optional
Payment/transfer currency
In Kazakhstan only KZT is allowed
Example:
KZT
pg_description
string 
required
Payment description.
Letters, numbers, dash (-), space.
(These parameters may include parameters from other sections. For the effective operation of SecureBox, it is recommended to follow the validation guidelines and field examples from this section)
Example:
Описание платежа
pg_merchant_id
number 
required
Merchant ID
Numbers.||integer
Example:
{{paybox_merchant_id}}
pg_order_id
string 
required
Order ID in the shop system
Numbers and Latin characters
Example:
123
pg_card_name
string 
required
Name and surname of card holders. Letters (Latin), dash (-) and space
Example:
TEST TESTOV
pg_card_pan
string 
required
Card number
Number of digits: from 13 to 20.||integer
pg_card_cvc
integer 
required
CVC/CVC2/CVV card password Numbers.||integer
pg_card_year
integer 
required
Card expiration year
Number of digits: 2||integer
pg_card_month
integer 
required
Card expiration month
Number of digits: 2||integer
pg_auto_clearing
boolean 
optional
Clearing type (0 or 1).
1 - automatic write-off after successful authorization, 0 - write-off by launching the clearing method Number of digits: 1||integer
pg_testing_mode
integer 
optional
Payment mode.
0 - production, 1 - test. If the mode is not specified, then the mode set in the shop settings is taken||integer
pg_3ds_challenge
boolean 
optional
Determines the need to complete the Challenge Flow
(1 - it is mandatory to conduct the Challenge Requested, 0 or empty - the method is determined by the issuer) the issuing bank can ignore this parameter and make a payment according to its own Challenge Flow
pg_exchange_params
object 
optional
Exchange rate parameters passed when a fixed rate needs to be used
rate
string 
optional
The exchange rate provided by the merchant. Payments will be converted using this exact rate.
rates_code
string 
optional
Unique currency rate source identifier. Contact your account manager to obtain this code.
ex_date
string 
optional
Historical date for applying the exchange rate. If empty, current date applies.
pg_param1
string 
optional
Additional parameter 1
String
pg_param2
string 
optional
Additional parameter 2
String
pg_param3
string 
optional
Additional parameter 3
String
pg_sig
string 
required
Digital signature of the request.
Numbers and Latin letters
Example:
{{paybox_signature}}
pg_salt
string 
required
Random string.
Random numbers and Latin letters Example: some random string
Example:
some random string
pg_user_id
string 
optional
User ID in the merchant's system.
Letters, digits, hyphen (-). Example format: "No65GFR755789T", "25642588"
(These parameters may include parameters from other sections. For the effective operation of SecureBox, it is recommended to follow the validation guidelines and field examples from this section)
pg_user_email
string 
optional
Payer's email or email linked (specified during registration) to the personal account ID or wallet number of the payer.
String in the format example@site.com.
(These parameters may include parameters from other sections. For the effective operation of SecureBox, it is recommended to follow the validation guidelines and field examples from this section)
pg_user_phone
string 
optional
Payer's phone number or phone number linked (specified during registration) to the personal account ID or wallet number of the payer.
Digits without spaces, plus signs, or parentheses. Example format: 89686810502, 87001234567.
(These parameters may include parameters from other sections. For the effective operation of SecureBox, it is recommended to follow the validation guidelines and field examples from this section)

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.freedompay.uz/g2g/payment' \
--form 'pg_amount="10"' \
--form 'pg_currency="KZT"' \
--form 'pg_description="Описание платежа"' \
--form 'pg_merchant_id="{{paybox_merchant_id}}"' \
--form 'pg_order_id="123"' \
--form 'pg_card_name="TEST TESTOV"' \
--form 'pg_card_pan=""' \
--form 'pg_card_cvc=""' \
--form 'pg_card_year=""' \
--form 'pg_card_month=""' \
--form 'pg_auto_clearing=""' \
--form 'pg_testing_mode=""' \
--form 'pg_3ds_challenge=""' \
--form 'pg_exchange_params=""' \
--form 'pg_param1=""' \
--form 'pg_param2=""' \
--form 'pg_param3=""' \
--form 'pg_sig="{{paybox_signature}}"' \
--form 'pg_salt="some random string"' \
--form 'pg_user_id=""' \
--form 'pg_user_email=""' \
--form 'pg_user_phone=""'

Responses

🟢200Success
application/xml
Body
pg_payment_id
string 
required
Transaction ID
pg_status
string 
required
Request status
pg_3ds
boolean 
required
Flag indicating the need for a 3DS request.
1 – 3DS is required, 0 - not required
pg_3d_md
string 
optional
Card Issuer Bank Url for 3ds Validation
pg_3d_acsurl
string 
optional
Parameter for request 3ds
pg_3d_pareq
string 
optional
Parameter for request 3ds
pg_auth_code
string 
required
Payment authorization code from the bank
pg_reference
string 
required
Transaction reference
pg_datetime
string 
required
Date and time of the request
pg_salt
string 
required
Random string
pg_sig
string 
required
Request digital signature
pg_card_id
integer 
optional
Saved card ID for next payments (Deprecated)
pg_card_token_to
string 
optional
Saved card token for next payments
pg_recurring_profile
integer 
optional
Recurring profile ID (if the payment request parameter pg_recurring_start = 1 was specified)
Example
<?xml version="1.0" encoding="utf-8"?>
<response>
    <pg_payment_id>7777777777</pg_payment_id>
    <pg_status>ok</pg_status>
    <pg_3ds>0</pg_3ds>
    <pg_auth_code/>
    <pg_reference/>
    <pg_datetime>2024-09-02T12:19:01+00:00</pg_datetime>
    <pg_salt>YtfwCGiBHsFLpYGk</pg_salt>
    <pg_sig>ccee466c01c2332d8a065d6108fd686b</pg_sig>
</response>
🟢200Process
🟢200Error
🟢200Invalid Signature
Previous
Introduction
Next
3DSecure