1. Callbacks
Freedom Pay
  • Overview
  • Gateway API
    • Overview
    • Sync API
      • Overview
      • Card data encryption
      • Payments
        • Overview
        • Pay by card
        • Pay by card: complete 3DS
        • Pay with Apple Pay
        • Pay with Google Pay
        • Pay by recurring profile
        • Create payment page
        • Create payment page with any amount
        • Capture payment (clearing)
        • Cancel payment
        • Refund payment
        • Get payment status
      • Payouts
        • Overview
        • Pay out to card
        • Pay out to IBAN
        • Get payout balance
        • Get payout status
      • Transfers
        • Overview
        • Transfer from card to card
        • Transfer from card to card: complete 3DS
        • Get exchange rates
        • Get transfer status
      • Saved cards
        • Overview
        • Save card
        • Save card: complete 3DS
        • List saved cards
        • Remove saved card
        • Pay by card token
        • Pay out to card token
        • Get payment status
    • Async API
      • Overview
      • Create
        • Create payment
        • Save card without a charge
      • Read
        • Get payment status
        • Get request result
      • Edit
        • Capture payment (clearing)
        • Cancel payment (reverse)
        • Refund payment
  • Merchant API
    • Overview
    • Payments
      • Overview
      • Checkout
      • Pay by saved card
        • Overview
        • Create payment
        • Confirm payment with CVC
        • Confirm payment without the client
      • Create payment
      • Create payment with a payment page template
      • Create payment in a payment frame
      • Create payment with any amount
      • Create recurring payment
      • Capture payment (clearing)
      • Cancel payment
      • Refund payment
      • Get payment status
    • Payouts
      • Overview
      • Create payout page
      • Pay out to saved card
      • Pay out to IBAN
      • Get payout status
      • Get payout balance
    • Saved cards
      • Get saved cards
      • Save card
      • Save card for payouts
      • Delete saved card
      • Save card without a charge
    • Mobile balance
      • Overview
      • Create mobile balance payment
      • Charge mobile balance
      • Get mobile balance payment status
      • Confirm payment with SMS code
      • Resend SMS code
    • Invoices
      • Overview
      • Recurring payments
        • Overview
        • Create recurring profile
        • Get recurring profile
        • Charge by recurring profile
        • Cancel recurring profile
        • Recurring profile notification
      • Tips
        • Overview
        • Create
      • Create invoice
      • Get invoice status
      • Get invoice details
      • Cancel invoice
      • Refund invoice
    • SDK
      • JS SDK
      • Merchant SDK
        • 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
      • CS-Cart
        • Overview
        • Installation
        • Configuration
        • Test
        • Live payments
    • Installment
      • Overview
      • Status
        • Get application status
        • Application status notification
        • Change application status
      • Get partners
      • Create application
    • Callbacks
      • Overview
      • Result notify
        POST
      • Check request
        POST
      • Payout notify
        POST
      • Redirect back
        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. Callbacks

Check request

KZ
https://api.freedompay.kz
KZ
https://api.freedompay.kz
POST
{{check_url}}
Freedom Pay asks your server whether the order can still be paid: right before the money is charged.
Sent only if Freedom Pay enabled the check for the merchant: contact your Freedom Pay manager.
URL: pg_check_url of the payment request, or the Check URL from the merchant settings. Without a URL the check is skipped.
Not sent for recurring payments.
Signed with the payment secret key: check the signature before you answer.
Common rules for all callbacks (method, signature): see Callbacks Overview.

Payment check flow#

After the check the payment goes on as usual: the result comes in Result notify.

Result#

Answer with an XML body:
Your answerMeaningNext step
XML with pg_status = okThe order can be paid.Freedom Pay charges the client. Wait for the result in Result notify.
XML with pg_status = rejectedThe order cannot be paid: for example, it is cancelled or the amount is wrong.Freedom Pay declines the payment: the client sees an error.
Not XML (an empty body, JSON, HTML), with any HTTP codeThe answer is treated as a refusal.Freedom Pay declines the payment.
Any other XML, for example with pg_status = errorThe answer is treated as ok.Freedom Pay charges the client.
No answer within 30 seconds, or no connectionThe check is skipped.Freedom Pay charges the client.
The check is not repeated: answer within 30 seconds.
Compare pg_amount and pg_currency with your order before you answer ok.

Request example#

pg_check_url = https://merchant.example.com/payment/check.
One field per line for reading: in the POST body the fields are joined with & and the values are URL-encoded.
pg_order_id=order-1001
pg_payment_id=1022123804618
pg_amount=1000
pg_currency=KZT
pg_ps_amount=1000
pg_ps_full_amount=1000
pg_ps_currency=KZT
pg_salt=Hq7mZ2pX5wL9cR3t
pg_sig=13daffe1fc8c7cbc197ab5d40c40ad04

Request

Body Params application/x-www-form-urlencoded

Responses

🟢200Payment allowed
application/xml
Bodyapplication/xml

Example
<?xml version="1.0" encoding="utf-8"?>
<response>
    <pg_status>ok</pg_status>
</response>
🟢200Payment rejected
Previous
Result notify
Next
Payout notify