Freedom Pay
  1. Merchant API
Freedom Pay
  • Overview
  • Gateway API
    • Overview
    • Sync API
      • Overview
      • Purchase
        • Overview
        • Create payment
        • Any amount
        • Card
        • 3DSecure
        • Cancel
        • Clearing
        • Refund
        • Status
      • Payout
        • Overview
        • Card
        • IBAN
        • Balance
        • Status
      • Transfer
        • Overview
        • Card
        • 3DSecure
        • Rates
        • Status
      • Card
        • Overview
        • Add
        • 3DSecure
        • List
        • Remove
        • Status
      • Token
        • Overview
        • Token Pay
        • Apple Pay
        • Google Pay
        • Token Payout
        • Status
    • Async API
      • Overview
      • create
        • create payment
        • create payment recurrent
      • read
        • read payment
        • read request
      • edit
        • edit payment.refund
        • edit payment.reverse
        • edit payment.clearing
      • delete
  • Merchant API
    • Overview
    • Purchase
      • Overview
      • Checkout
      • Card token
        • Overview
        • Tokenize card
        • Delete token
        • Card token list
        • Create payment (with CVC)
        • Confirm payment (with CVC)
        • Create payment
        • Confirm payment
      • Create payment
      • Any amount
      • Cancel payment
      • Clearing
      • Refund payment
      • Status
    • Payout
      • Overview
      • Card token
        • Tokenize card
        • Delete token
        • Card token list
        • Create payment
      • Create payment
      • IBAN
      • Balance status
      • Status by order_id
      • Status by Payment ID
      • Status
    • Mobile balance
      • Overview
      • Init
      • Pay
      • Approve
      • Resend code
      • Status
    • Invoice
      • Overview
      • Init
      • Info
      • Pay
      • Status
    • SDK
      • JS SDK
      • Google Pay
      • Freedom QR
        • Reader SDK (Android)
        • Provider SDK (Android)
      • Payment SDK
        • iOS
        • Android
    • CMS
      • Overview
      • Get Merchant ID and key
      • WordPress
        • Overview
        • Installation
        • Configuration
        • Test
        • Live payments
        • Update
      • Tilda
        • Overview
        • Installation
        • Configuration
        • Test
        • Live payments
      • InSales
        • Overview
        • Installation
        • Configuration
        • Test
        • Live payments
      • Ecwid
        • Overview
        • Installation
        • Configuration
        • Test
        • Live payments
      • Bitrix
        • Overview
        • Installation
        • Configuration
        • Test
        • Live payments
      • PrestaShop
        • Overview
        • Installation
        • Configuration
        • Test
        • Live payments
      • OpenCart
        • Overview
        • Installation
        • Configuration
        • Test
        • Live payments
    • Redirect back
      POST
    • Result notify
      POST
    • Payout notify
      POST
    • Check request
      POST
  • Card API
    • Overview
    • Payment Cards
      • Overview
      • Dictionaries
      • Bulk issue
      • Issue card
      • Issue plastic card
      • Activate card
      • Block card
      • Unblock card
      • Set PIN
      • Reset PIN counter
      • Close card
      • Update client
      • Card info
      • Balance
      • Secret data
      • Secret data (version 2)
      • Statement
      • Statement extended
      • Create client
      • Edit client
      • Сards' list
      • Request' status
      • Create transaction
      • Clearing transaction
      • Refund transaction
      • Transaction request' status
      • Transaction info
    • Gift Cards
      • Overview
      • List
      • Issue
      • Confirm
      • Resend
      • Resend code
      • Status
  • Partner API
    • Rates
      • Overview
      • Rates
    • Products
      • Overview
      • Dictionaries
      • Add client with product
      • Request status
    • E-Money
      • Overview
      • Add
      • Owner identification
      • Info
      • Close
      • Block
      • Balance
      • Statement
      • Request Status
    • Freedom ID
      • Overview
      • Design
      • iOS SDK
      • Android SDK
      • OAuth2
        • Authorization link
        • Token exchange
        • Token refresh
        • User info
        • Request profile
        • Get profile status
        • Create user
        • Update user
      • OIDC
        • Authorization endpoint
        • Token exchange
        • Userinfo
      • Error codes
      • Examples
        • Keycloak
    • Transfer
      • Overview
      • Get token
      • Refresh token
      • Get agents
      • Fees
      • Create person
      • Create business
      • Create transfer
      • Print application
      • Confirm
      • Search
      • Payout
      • Payout confirm
      • Cancel
      • Get person info
      • Get business info
      • Status
      • Info
    • Device ID
      • Android SDK
      • iOS SDK
  1. Merchant API

Overview

FreedomPay is a universal payment acceptance tool for businesses.
Each documentation script includes all the queries that can be executed to implement the chosen script.
You should read the Overview topic before start.
Call your manager, if you have any questions.
Attention!
Connection doesn't require a PCI DSS certificate

Query Mechanics#

 The API supports GET requests and POST requests with Content-type equal to form-data or x-www-form-urlencoded
 Data can be sent:
GET method - data is passed in GET parameters; when transferring complex structured data, such as multidimensional arrays, the following notation format is used:
{{domain}}/script.php?param_1=val&param_2[subParam_1]=val2& param_2[subParam_2]=val3&param_3=val4
POST method - data is transmitted in POST parameters. Structural data when working via POST are formed in a similar way.
Via XML - requests are also transmitted by the Post method, only in the only pg_xml parameter, presented in XML form:
<?xml version="1.0" encoding="utf-8"?><request><pg_param1>value1</pg_param><pg_param2>value2</pg_param></request>

Signature#

 Any messages (requests and responses) between FreedomPay and the merchant are signed. To create a signature, you need to concatenate the following with a separator ;:
1.
The name of the script being called (from the last / to the end or ?).
2.
All message fields in alphabetical order, including the random string pg_salt, which consists of an arbitrary number of digits and Latin letters.
3.
Additionally:
This rule is applied recursively to nested tags (only for XML).
Fields with the same name are taken in the order they appear in the message.
4.
The payment password secret_key, which is set in the store settings and is known only to the merchant and FreedomPay.
 The resulting concatenated string must then be hashed using MD5, and the hash should be added to the request or response as an additional parameter pg_sig. The MD5 hash is recorded as a 32-character lowercase hexadecimal string.
Either party may add additional parameters to the request or response that are not specified in the documentation. These parameters also participate in the signature calculation. A message is not signed, and thus the fields pg_salt and pg_sig are absent only in one case – when FreedomPay could not identify the merchant and therefore does not know its secret_key. In such a case, the field pg_error_code (numeric error code) takes the value 9998.
 For a complete list of possible values of the field pg_error_code, see the Error Code Reference section.
Curl example:
PHP example:

Test cards and mobile phones#

- available, - not available, - impossible

Cards for purchase#

Card number3DSauthclearingreverserefundcard add
4716047261941981
4916307416334310
5367654276102126
4939770956154989
5335215945367703
4916109830832246
5548398681700148
5475102935853613

Cards for payout#

Card numberstatusdescription
4671593866478252success operation
5325349472901311error code: 10000
4556046085041740error code: 10001
5543974702876045error code: 8888
5507841999732294process turn to "success operation"
4532676596620704process turn to "error code: 10001"

Mobile phones#

CodeDescriptionOTP code
Kcell+77017777777111111
Activ+77027777777111111
Tele2+77037777777111111
Altel+77047777777111111

Error codes#

You can find the up-to-date reference of error codes at the following link Click here

Support#

If you found an inaccuracy or need help, feel free to reach out! 👋
Email: support@freedompay.kz
Modified at 2025-02-18 06:22:27
Previous
edit payment.clearing
Next
Purchase