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

Check request

POST
https://api.freedompay.kz{{check_url}}
To use this request, you should contact your manager
Before accepting money from the buyer on the account, the payment gate can call the merchant script Check URL using the Request Method
Check URL on the merchant side must be public, without authorization
{{project}} sends information about the number and properties of the order and waits for a response. Failure to respond within the specified time is considered as a refusal to pay.
The Check URL script is called only if this option was enabled in the merchant settings
Merchant response to check_url:
ok - payment accepted
rejected - payment refusal
error - error in data interpretation
If Check URL is empty at the moment of payment initialization or not specified at the moment of payment initialization, and is set to empty in the merchant settings, then the step of checking the ability to make a payment is skipped and it is considered that the merchant agrees to accept the payment

Request

Body Params multipart/form-data
pg_order_id
string 
required
Order ID in the merchant system.
<= 50 characters
Example:
123456789
pg_payment_id
integer 
required
Internal payment identifier in the system {{project}}.
Example:
12345
pg_amount
number 
required
The amount of the invoice (in pg_currency) is the same as pg_amount at the time of payment initialization.
>= 0.01<= 9999999
Example:
10
pg_currency
string 
required
Invoicing currency
<= 3 characters
Example:
KZT
pg_ps_amount
number 
required
The amount of the invoice (in pg_ps_currency currency) issued in the payment system.
>= 0.01<= 9999999
Example:
5
pg_ps_currency
string 
required
The currency in which the payment was made in the payment system. The field may be absent in case of unsuccessful payment.
<= 3 characters
Example:
KZT
pg_ps_full_amount
number 
required
The total amount (in pg_ps_currency currency) that the buyer will pay including all fees.
>= 0.01<= 99999999
Example:
5
Merchant parameters
string 
optional
All fields passed from the merchant website that do not have the pg_ prefix.
pg_salt
string 
required
Random string.
Example:
some random string
pg_sig
string 
required
Request signature.

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 -g --request POST '{{check_url}}' \
--form 'pg_order_id="123456789";type=false' \
--form 'pg_payment_id="12345";type=false' \
--form 'pg_amount="10";type=false' \
--form 'pg_currency="KZT";type=false' \
--form 'pg_ps_amount="5";type=false' \
--form 'pg_ps_currency="KZT";type=false' \
--form 'pg_ps_full_amount="5";type=false' \
--form 'Merchant parameters="";type=false' \
--form 'pg_salt="some random string";type=false' \
--form 'pg_sig="";type=false'

Responses

🟢200Success
application/xml
Body
pg_status
string 
optional
If the merchant confirms the readiness of the order and the correctness of the amount, he must respond in the form of XML with the status ok.
In case of refusal to pay rejected.
error - error in data interpretation.
pg_description
string 
optional
pg_salt
string 
optional
pg_sig
string 
optional
Example
<?xml version="1.0" encoding="utf-8"?>
<response>
    <pg_status>ok</pg_status>
    <pg_description>Платеж разрешен</pg_description>
    <pg_salt>random string</pg_salt>
    <pg_sig>ksdjrimzjedkljsujjemnjsuj</pg_sig>
</response>
🟢200Rejected
🟢200Error
Previous
Payout notify
Next
Overview