Freedom Pay
  1. 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
          POST
        • Apple Pay
          POST
        • Google Pay
          POST
        • Token Payout
          POST
        • Status
          POST
    • 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. Token

Apple Pay

POST
https://api.freedompay.kz/g2g/payment

Request

Body Params multipart/form-data
pg_merchant_id
number 
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
pg_amount
number 
required
Payment amount in pg_currency
pg_currency
string 
required
Currency in which the amount is specified
pg_description
string 
required
Payment description
(These parameters may include parameters from other sections. For the effective operation of SecureBox, it is recommended to follow the validation guidelines and field examples from this section)
pg_testing_mode
integer 
required
Creating a payment in test mode
pg_auto_clearing
boolean 
required
Clearing type (0 or 1)
1 - automatic write-off after successful authorization, 0 - write-off by launching the clearing method
pg_payment_method
string 
required
Payment method
pg_card_pan
string 
required
Card number
pg_card_cvc
integer 
optional
CVC/CVC2/CVV card password
pg_card_year
integer 
required
Card expiration year
pg_card_month
integer 
required
Card expiration month
pg_card_name
string 
required
Name and surname of card holders
pg_online_payment_cryptogram
string 
required
Ephemeral public key bytes. EC_v1 only. Encrypted string. Related to the field pg_eci_indicator
pg_3ds_challenge
boolean 
required
Determines the need to complete the Challenge Flow
(1 - it is mandatory to conduct the Challenge Requested, 0 or empty - the method is determined by the issuer) the issuing bank can ignore this parameter and make a payment according to its own Challenge Flow
pg_eci_indicator
string 
required
ECI indicator, as definition of 3d secure. Confirmation from Apple
String
pg_param1
string 
required
Additional parameter 1
pg_param2
string 
required
Additional parameter 2
pg_param3
string 
required
Additional parameter 3
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/g2g/payment' \
--form 'pg_merchant_id=""' \
--form 'pg_order_id=""' \
--form 'pg_amount=""' \
--form 'pg_currency=""' \
--form 'pg_description=""' \
--form 'pg_testing_mode=""' \
--form 'pg_auto_clearing=""' \
--form 'pg_payment_method=""' \
--form 'pg_card_pan=""' \
--form 'pg_card_cvc=""' \
--form 'pg_card_year=""' \
--form 'pg_card_month=""' \
--form 'pg_card_name=""' \
--form 'pg_online_payment_cryptogram=""' \
--form 'pg_3ds_challenge=""' \
--form 'pg_eci_indicator=""' \
--form 'pg_param1=""' \
--form 'pg_param2=""' \
--form 'pg_param3=""' \
--form 'pg_salt=""' \
--form 'pg_sig=""'

Responses

🟢200Success
application/xml
Body
pg_payment_id
integer 
required
Payment ID
pg_status
string 
required
ok
pg_3ds
boolean 
required
pg_3d_acsurl
string 
required
pg_3d_md
string 
required
pg_3d_pareq
string 
required
pg_recurring_profile
integer 
required
pg_card_id
string 
required
pg_card_token
string 
required
pg_auth_code
string 
required
pg_salt
string 
required
pg_sig
string 
required
pg_datetime
string 
required
Example
<?xml version="1.0" encoding="utf-8"?>
<response>
    <pg_payment_id>1234567890</pg_payment_id>
    <pg_status>ok</pg_status>
    <pg_3ds>1</pg_3ds>
    <pg_3d_acsurl>https://bank.com/3ds-validation</pg_3d_acsurl>
    <pg_3d_md>abc123456</pg_3d_md>
    <pg_3d_pareq>xyz-98765</pg_3d_pareq>
    <pg_recurring_profile>12345</pg_recurring_profile>
    <pg_card_id>9876543210</pg_card_id>
    <pg_card_token>token-abc123</pg_card_token>
    <pg_auth_code>123456</pg_auth_code>
    <pg_salt>some random string</pg_salt>
    <pg_sig>signature-abc123</pg_sig>
    <pg_datetime>2024-09-02T12:19:01+00:00</pg_datetime>
</response>
Previous
Token Pay
Next
Google Pay