Freedom Pay
  1. Card token
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
          POST
        • Delete token
          POST
        • Card token list
          POST
        • Create payment
          POST
      • Create payment
        POST
      • IBAN
        POST
      • Balance status
        POST
      • Status by order_id
        POST
      • Status by Payment ID
        POST
      • Status
        POST
    • 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. Card token

Create payment

POST
https://api.freedompay.kz/api/reg2reg
Card token payout is used to make a payout where a token is used instead of real card details (e.g., the card number)
A token is a unique identifier generated for a specific card and used for transactions, ensuring data security

Interaction diagram#

Status: success/error/pending
Merchant_API_V3-Token payout.drawio.png

Request

Body Params multipart/form-data
pg_merchant_id
integer 
required
Merchant ID in {{project}}
Issued upon connection
pg_order_id
string 
required
Payment ID in the merchant system. It is recommended to keep this field unique
Example:
550e8400-e29b-41d4-a716-446655440000
pg_amount
number 
required
Payment amount
>= 0.01<= 99999999
pg_description
string 
required
Payment description
pg_order_time_limit
string <date-time>
required
Time limit for making a payment
Match pattern:
Y-m-d H:i:s
pg_user_id
string 
required
User ID in the system
<= 50 characters
Example:
No65GFR755789T
Match pattern:
^[a-zA-Z0-9_-]+$
pg_post_link
string 
required
URL to which payment status response is sent
<= 255 characters
Example:
https://site.com/post
pg_card_token_to
string 
required
Token of the card to transfer money to (returned when registering the card)
Example:
ef741cfc-f85e-41a0-84e6-2ba964912182
pg_salt
string 
required
A 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/api/reg2reg' \
--form 'pg_merchant_id=""' \
--form 'pg_order_id="550e8400-e29b-41d4-a716-446655440000"' \
--form 'pg_amount=""' \
--form 'pg_description=""' \
--form 'pg_order_time_limit=""' \
--form 'pg_user_id="No65GFR755789T"' \
--form 'pg_post_link="https://site.com/post"' \
--form 'pg_card_token_to="ef741cfc-f85e-41a0-84e6-2ba964912182"' \
--form 'pg_salt=""' \
--form 'pg_sig=""'

Responses

🟢200Success
application/xml
Body
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.
pg_merchant_id
integer 
required
Merchant ID in the {{project}} system.
pg_status
string 
required
Request status.
Status Description:
ok: Request completed successfully.
error: Request completed with an error.
process: Final payment status need.
pg_order_id
string 
optional
Order ID in the merchant system.
pg_balance
number 
optional
Merchant's balance in the {{project}} system.
pg_card_hash
string 
optional
The card to which the payment was made.
pg_card_id
integer 
optional
Recipient's card ID.
pg_payment_amount
number 
optional
Payment amount.
pg_payment_date
string <date-time>
required
Date and time of the payment.
pg_error_code
integer 
optional
Error code.
pg_error_description
string 
optional
Description of the error.
pg_salt
string 
required
Random string consisting of arbitrary numbers and Latin letters.
pg_sig
string 
required
Request signature.
Example
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <pg_payment_id>0</pg_payment_id>
  <pg_merchant_id>0</pg_merchant_id>
  <pg_status>string</pg_status>
  <pg_order_id>string</pg_order_id>
  <pg_balance>0</pg_balance>
  <pg_card_hash>string</pg_card_hash>
  <pg_card_id>0</pg_card_id>
  <pg_payment_amount>0</pg_payment_amount>
  <pg_payment_date>2019-08-24T14:15:22Z</pg_payment_date>
  <pg_error_code>0</pg_error_code>
  <pg_error_description>string</pg_error_description>
  <pg_salt>string</pg_salt>
  <pg_sig>string</pg_sig>
</root>
Previous
Card token list
Next
Create payment