1. Edit
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
      • Read
        • Get payment status
        • Get request result
      • Edit
        • Capture payment (clearing)
          POST
        • Cancel payment (reverse)
          POST
        • Refund payment
          POST
  • 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. Edit

Capture payment (clearing)

KZ
https://api.freedompay.kz
KZ
https://api.freedompay.kz
POST
https://api.freedompay.kz
/v5/g2g/edit
Debits funds held by a two-step payment (auto_clearing = false).
The X-Action header must be gateway.payment.clearing.
Clearing is possible once, only for a payment in status approved.
Without amount the full payment amount is debited; with a smaller amount the rest is reversed automatically.
The clearing is processed asynchronously: the response returns the payment with status process_clearing; get the final status via gateway.payment.status or gateway.request.status.
For a one-step payment (auto_clearing = true) clearing is not needed: the payment is debited at creation; to return the money use gateway.payment.refund.
Two-step payment flow
Requests to the payment system are processed asynchronously: the API responds immediately, the result is available via gateway.payment.status.
If a response is lost or returned with X-Request-Status = process, get the result via gateway.request.status with the X-Request-Id of that request.
A clearing with an amount less than the payment amount reverses the rest automatically (reverse_payments).

Request

Header Params

Body Params application/json

Examples
{
  "id": "01a133af-20c6-75d2-8c07-2bef4dc95212"
}

Responses

🟢200OK
application/json
Headers

Bodyapplication/json

Examples
{
  "id": "01a133af-20c6-75d2-8c07-2bef4dc95212",
  "status": "process_clearing",
  "amount": 100,
  "created_at": "2026-10-13T05:14:37.638388726Z",
  "clearing": {
    "amount": 40
  }
}
🟠400Bad Request
🟠422Unprocessable Entity
🟠401Unauthorized
🔴500Internal Server Error
Previous
Get request result
Next
Cancel payment (reverse)