1. Purchase
Freedom Pay
  • Overview
  • Gateway API
    • Overview
    • Sync API
      • Overview
      • Card data encryption
      • Purchase
        • Overview
        • Create payment
          POST
        • Any amount
          POST
        • Pay by card
          POST
        • Pay by card: complete 3DS
          POST
        • Pay by recurring profile
          POST
        • Cancel payment
          POST
        • Capture payment (clearing)
          POST
        • Refund payment
          POST
        • Get payment status
          POST
      • Payout
        • Overview
        • Card
        • IBAN
        • Balance
        • Status
      • Transfer
        • Overview
        • Card
        • 3DSecure
        • Rates
        • Status
      • Card
        • Overview
        • Add
        • 3DSecure
        • List
        • Remove
        • Get payment status
      • Token
        • Overview
        • Token Pay
        • Apple Pay
        • Google Pay
        • Token Payout
        • Get payment status
    • Async API
      • Overview
      • Create
        • Create payment
      • Read
        • Get payment status
        • Get request result
      • Edit
        • Capture payment (clearing)
        • Cancel payment (reverse)
        • Refund payment
  • 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
      • Reccuring payment
      • 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
    • Mobile balance
      • Overview
      • Init
      • Pay
      • Approve
      • Resend code
      • Status
    • Invoice
      • Overview
      • Recurring profile
        • Overview
        • Create
        • Cancel
        • Info
        • Notify
      • Tips
        • Overview
        • Create
      • Create
      • Execute
      • Info
      • Refund
      • Status
      • Cancel
    • SDK
      • JS SDK
      • Merchant SDK
        • Google Pay
        • Android
        • IOS
    • 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
    • Installment
      • Overview
      • Status
        • Application Status
        • Application Callback Status
        • Application Change Status
      • Get partners
      • Create application
    • Redirect back
      POST
    • Result notify
      POST
    • Payout notify
      POST
    • Check request
      POST
  • Partner API
    • Rates
      • Overview
      • Rates
    • Products
      • Overview
      • Dictionaries
      • Add client with product
      • Client request status
      • Create terminal
      • Update terminal limits
      • Product request status
    • E-Money
      • Overview
      • Add
      • Owner identification
      • Info
      • Close
      • Block
      • Balance
      • Statement
      • Request Status
    • Device ID
      • Android SDK
      • iOS SDK
    • Implement SuperApp
      • Overview
      • Pay
      • Refund
      • Status
    • Account
      • Overview
      • Create payment
      • Payment status
      • Batch statuses
      • Statement
      • Statement status
      • Balance
      • Balance status
    • Invoices
      • Info
  1. Purchase

Pay by card

KZ
https://api.freedompay.kz
KZ
https://api.freedompay.kz
POST
https://api.freedompay.kz
/g2g/payment
Creates a payment with card data and returns the result in the same response.
If the card requires 3DS authentication, the response contains the data for the 3DS page; the payment is completed with Pay by card: complete 3DS.
pg_order_id is not checked for uniqueness: every request creates a new payment.
Test cards: see Gateway API Overview.

Result#

pg_statuspg_3dsMeaningNext step
ok0The payment is authorized.One-step payment: nothing else is needed. Two-step payment (pg_auto_clearing = 0): capture the amount with clearing or release it with cancel.
ok13DS authentication is required.Redirect the client to pg_3d_acsurl (see below), then call Pay by card: complete 3DS.
pending—The payment system has not returned the result yet.Request the status with status_v2 until it is final.
error—The request is rejected or the payment is declined.See «Errors» below.

3DS authentication#

Redirect the client to pg_3d_acsurl with an HTML form (POST):
After the client passes 3DS authentication, the browser sends MD and PaRes to TermUrl (POST).
Pass them to Pay by card: complete 3DS as pg_md and pg_pares together with pg_payment_id.

Payment without 3DS#

If the payment system does not answer in time, the response is pg_status = pending: request the status with status_v2.

Payment with 3DS#

Errors#

The HTTP status is always 200; the error is returned in pg_error_code and pg_error_description.
pg_error_codeWhenWhat to do
9403A parameter is missing or has an invalid value. pg_error_description names the parameter.Fix the request.
1370pg_amount is not a number, is less than 0.01 or more than 99999999.Fix the amount.
1380The amount is below the minimum for the payment system. The payment is created with an error, pg_payment_id is returned.Increase the amount or contact Freedom Pay.
1100The signature is missing or invalid.Check the signature: see Sync API Overview.
1101pg_merchant_id is not found. The response is not signed.Check the merchant ID.
Other codesThe payment is declined by the issuer or the payment system. pg_payment_id is returned.See Error codes.

Request example#

Required fields only. pg_sig is calculated with the secret key test_secret_key.
Line breaks in the body are added for readability: send the body as one line.

Request

Body Params multipart/form-data

Responses

🟢200Success
application/xml
Bodyapplication/xml

Examples
<?xml version="1.0" encoding="utf-8"?>
<response>
    <pg_payment_id>1014070103803</pg_payment_id>
    <pg_status>ok</pg_status>
    <pg_3ds>0</pg_3ds>
    <pg_secure_details>F</pg_secure_details>
    <pg_auth_code>568434</pg_auth_code>
    <pg_reference>261014103400</pg_reference>
    <pg_datetime>2026-10-14T10:34:00+00:00</pg_datetime>
    <pg_salt>Y7fsVdkrm135u5dd</pg_salt>
    <pg_sig>f5f52bc8e06991ba10f34022cb617b78</pg_sig>
</response>
🟢200Error
Previous
Any amount
Next
Pay by card: complete 3DS