Freedom Pay
  1. Merchant API
Freedom Pay
  • Gateway API
    • Introduction
    • Reference
      • Test cards
      • Error codes
    • Sync API
      • Introduction
      • Page
        • Introduction
        • Page
        • Page with amount control
        • Status
      • Pay
        • Introduction
        • Card
        • 3DSecure
        • Cancel
        • Clearing
        • Refund
        • Status
      • 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. Merchant API

Introduction

General information#

You should read the Introduction topic before start.
Call your manager, if you have any questions.
Attention!
Connection does not require a PCI DSS certificate

About service#

 FreedomPay is a universal payment acceptance tool for businesses.
 The service enables payment processing, payouts to bank cards, and card saving. These functionalities are divided into three main categories:
Payment Acceptance: This section outlines the process by which {{project}} collects payments on behalf of the merchant and subsequently transfers the funds to the designated bank account.
Payouts: This section explains the procedure when {{project}} disburses funds to the user's bank card.
Saving Cards: This section covers the basic mechanics of saving cards. Once saved, these cards can be used for both receiving payments and making payments.
 Each documentation script includes all the queries that can be executed to implement the chosen script.

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 Formation#

 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.

Example of request with signature:#

PHP example:#


Support#

If you found an inaccuracy or need help, feel free to reach out! 👋
Email: support@freedompay.kg
Modified at 2025-02-11 11:15:52
Previous
edit payment.clearing
Next
Test cards