Freedom Pay
  1. create
Freedom Pay
  • Overview
  • Gateway API
    • Overview
    • Sync API
      • Overview
      • Purchase
        • Overview
        • Create payment
        • Any amount
        • Card
        • 3DSecure
        • Recurrent
        • 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
          POST
      • read
        • read payment
        • read request
      • edit
        • edit payment.refund
        • edit payment.reverse
        • edit payment.clearing
  • 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)
      • Operations' list
      • Statement extended
      • Create client
      • Edit client
      • Сards' list
      • Request' status
      • Create transaction
      • Clearing transaction
      • Refund transaction
      • Transaction info
      • Cardholder validation
      • Set limits
      • Limits list
    • 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
    • Implement SuperApp
      • Overview
      • Pay
      • Refund
  1. create

create payment

POST
https://api.freedompay.kz/v5/g2g/create

Request

Header Params
Accept
string 
required
Indicates the media types that the client is able to understand from the server response.
Default:
application/json
Content-Type
string 
required
Specifies the media type of the resource being sent to the server.
Default:
application/json
X-JWS-Signature
string 
required
Request signature.
Example:
eyJhbGciOiJSUzI1NiIsImtpZCI6IjEyMzQ1NiJ9.eyJpc3MiOiJleGFtcGxlLmNvbSIsInN1YiI6InVzZXIxMjMiLCJhdWQiOiJhcGkuZXhhbXBsZS5jb20iLCJleHAiOjE2MzAwMDAwMDAsImlhdCI6MTYyOTk5NjQwMH0.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
X-Action
string 
required
Invoked method.
Default:
gateway.payment.create
X-Request-Id
string 
required
Unique request ID (UUID).
If the same request_id is sent more than once, the API guarantees idempotent behavior and returns the original response.
Example:
01978c2b-f191-7b56-92f8-20c7c401d1fc
Body Params application/json
amount
number <float>
required
Payment amount.
currency
string 
required
Payment currency.
Example:
KZT
description
string 
required
Payment description.
Example:
description
order_id
string 
required
Order number in the merchant's system.
If the same order_id is sent more than once, the API guarantees idempotent behavior and returns the original response.
Example:
1234
user_id
string 
optional
Client ID.
Example:
12345
auto_clearing
boolean 
required
Flag indicating the need for automatic clearing.
Default:
true
from
object 
required
type
string 
required
Type of the debit object.
Examples:
cardtokenizedrecurrentsaved
card
object 
required if type=card or saved
optional
Object containing card data.
recurrent
object 
required if type = recurrent
optional
Contains info about starting a recurrent profile or performing a recurrent payment.
device
object 
optional
Payer’s device information.
user_ip
string 
optional
Client’s IP address.
Example:
84.252.158.239
Examples
{
    "amount": 100,
    "currency": "KZT",
    "description": "description",
    "order_id": "1234",
    "user_id": "12345",
    "auto_clearing": false,
    "from": {
        "type": "card",
        "card": {
            "name": "Test Test",
            "pan": "4400444400004440",
            "cvc": "123",
            "year": 30,
            "month": 5
        }
    },
    "device": {
        "user_ip": "84.252.158.239"
    }
}

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
curl --location --request POST 'https://api.freedompay.kz/v5/g2g/create' \
--header 'Accept;' \
--header 'X-JWS-Signature;' \
--header 'X-Action;' \
--header 'X-Request-Id;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount": 100,
    "currency": "KZT",
    "description": "description",
    "order_id": "1234",
    "user_id": "12345",
    "auto_clearing": false,
    "from": {
        "type": "card",
        "card": {
            "name": "Test Test",
            "pan": "4400444400004440",
            "cvc": "123",
            "year": 30,
            "month": 5
        }
    },
    "device": {
        "user_ip": "84.252.158.239"
    }
}'

Responses

🟢200OK
application/json
Headers
x-request-id
string 
required
Request ID (UUID), equals X-Request-Id from request headers.
Example:
01978c2b-f191-7b56-92f8-20c7c401d1fc
x-request-status
string 
required
Request status.
Default:
success
x-datetime
string 
required
Request datetime.
Example:
2025-06-20T07:13:31Z
Body
id
string 
required
Payment ID (UUID)
Example:
01978c37-a961-7d20-8434-632242b24d48
status
string 
required
Payment status
Examples:
processsuccesserror
amount
number <float>
required
Payment amount
created_at
string 
required
Payment datetime
Example:
2025-06-20T07:13:31.068188524Z
error
object 
optional
Object for an error
code
string 
optional
Error code
Example:
10045
description
string 
optional
Error description
Example:
Charge from card declined due to security reasons.
Examples
{
    "id": "01978c37-a961-7d20-8434-632242b24d48",
    "status": "process",
    "amount": 100,
    "created_at": "2025-06-20T07:13:31.068188524Z"
}
🟠422Unprocessable Entity
Modified at 2025-06-26 13:31:03
Previous
Overview
Next
read payment