Freedom Pay
  1. Mobile balance
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
        POST
      • Pay
        POST
      • Approve
        POST
      • Resend code
        POST
      • Status
        POST
    • 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. Mobile balance

Pay

POST
https://api.freedompay.kz/mfs/pay
If you prefer to use your own interface for the payer instead of the ready-made web interface from Freedom Pay Gateway, you can use this method.
To get started with this method, you first need to use the Init method (described above) to obtain the pg_payment_id
Then, you can use the Pay method to initiate the payment process, and in the request to the Freedom Pay Gateway, you will need to pass the previously obtained pg_payment_id

Interaction diagram#

Status: success/error/pending
Merchant_API_V3-Mobile balance pay.drawio.png

Request

Body Params multipart/form-data
pg_merchant_id
integer 
required
Merchant ID in {{project}}
Issued upon connection
pg_payment_id
number 
required
Transaction ID
pg_abonent_phone
number 
required
Customer's phone to be charged
Example:
77077777777
pg_payment_system_code
enum<string> 
optional
Unique mobile operator code.
Allowed values:
ACTIVKZTALTELKZTBEELINEKZTKCELLKZTTELE2KZT
pg_salt
string 
required
Random string consisting of arbitrary numbers and Latin letters
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 --request POST 'https://api.freedompay.kz/mfs/pay' \
--form 'pg_merchant_id=""' \
--form 'pg_payment_id=""' \
--form 'pg_abonent_phone="77077777777"' \
--form 'pg_payment_system_code=""' \
--form 'pg_salt=""' \
--form 'pg_sig=""'

Responses

🟢200Success
application/xml
Body
pg_status
string 
required
Shows the result of the query.
Status Description:
ok: The write-off was successful.
need_approve: Confirmation required.
error: Debit error.
pg_payment_id
integer 
required
The unique identifier of the payment transaction in {{project}}. Serves as a key for all further work with the transaction.
Example
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <pg_status>string</pg_status>
  <pg_payment_id>0</pg_payment_id>
</root>
Previous
Init
Next
Approve