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 recurring profile

KZ
https://api.freedompay.kz
KZ
https://api.freedompay.kz
POST
https://api.freedompay.kz
/g2g/recurrent
Charges the card saved in a recurring profile without the client: no card data and no 3DS. The result is returned in the same response.
The profile is created by the first payment with pg_recurring_start = 1 in Pay by card: its ID is returned in pg_recurring_profile. Recurring payments are available after Freedom Pay enables them for the merchant: contact your account manager.
Charge the profile only after the first payment is successful.
The payment is made in the currency of the first payment; the amount can differ. The amount is captured right away: clearing is not needed, to return the money call refund.
Test cards: see Gateway API Overview.

Result#

pg_statusMeaningNext step
okThe payment is made: pg_payment_id is the ID of the new payment.To return the money, call refund.
errorThe request is rejected or the payment is declined.See «Errors» below.

Recurring payment flow#

Each charge is a separate payment with its own pg_payment_id and pg_order_id.

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, or the profile pg_recurring_profile does not exist.Fix the request.
1370pg_amount is missing, is not a number, or is outside the range 0.01–99999999.Fix the amount.
1380The amount is too small: the commission is greater than the amount. The payment is not made and stays in the waiting status, 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.
9011Invalid recurring profile ID: the profile cannot be used by this merchant.Check pg_recurring_profile and pg_merchant_id.
9101The first payment of the profile is fully refunded.Create a new profile with a new first payment.
110891The merchant has no payment system for recurring payments by this card. The payment is not made and stays in the waiting status, pg_payment_id is returned.Contact Freedom Pay.
10000The payment could not be performed.Repeat the request later.
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

Example
<?xml version="1.0" encoding="utf-8"?>
<response>
    <pg_payment_id>1015054204363</pg_payment_id>
    <pg_status>ok</pg_status>
    <pg_recurring_profile>64</pg_recurring_profile>
    <pg_datetime>2026-10-15T12:58:07+00:00</pg_datetime>
    <pg_salt>6MYsRrZ52JiSiomy</pg_salt>
    <pg_sig>1172fe9c0d275f84652a287562e47919</pg_sig>
</response>
🟢200Error
Previous
Pay by card: complete 3DS
Next
Cancel payment