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

Payout notify

KZ
https://api.freedompay.kz
KZ
https://api.freedompay.kz
POST
{{post_link}}
Freedom Pay sends the final result of a payout to pg_post_link of the payout request.
Sent once the payout is final: successful or failed.
Signed with the payout secret key (not the payment one): check the signature before you act on the notification.
Common rules for all callbacks: see Callbacks Overview.

Payout notification flow#

The notification is a POST request (application/x-www-form-urlencoded) with one field pg_xml: an XML document with the root response.

Fields of the XML#

FieldDescriptionPayout methods
pg_statusResult: ok the payout is successful, error the payout failed.all
pg_payment_statusStatus of the payout: success or error. The same value as in Get payout status.all
pg_payment_idPayout ID in Freedom Pay.all
pg_order_idPayout ID in the merchant system: pg_order_id of the payout request.all
pg_merchant_idMerchant ID.all except IBAN
pg_payment_amountPayout amount.all except IBAN
pg_to_payAmount written off the merchant balance: the payout amount, plus the commission if the merchant pays it.payout page
pg_balanceBalance of the merchant after the payout.all except IBAN
pg_payment_dateDate and time of the payout, format YYYY-MM-DD hh:mm:ss. Empty if the payout failed.all except IBAN
pg_card_hashMasked card number of the recipient.payout page, payout to a saved card
pg_card_id, pg_card_tokenID and token of the saved card.payout to a saved card
pg_typeiban2iban.payout by IBAN
pg_failure_code, pg_failure_descriptionError code and description. Sent if the payout failed.all
pg_salt, pg_sigRandom string and the signature with the payout secret key.all
Check pg_sig over all the fields of the XML by the rules in Merchant API Overview, with the payout secret key; the script name is the last segment of the path of pg_post_link.
The XML may have other fields: ignore the ones you do not know, but keep them in the signature check.

Result#

Your answerMeaningNext step
HTTP 200, or the body <pg_status>ok</pg_status>The notification is delivered.Nothing else is needed.
Anything else, or no answer within 30 secondsThe notification is not delivered.Freedom Pay repeats it after about 4 minutes, at most 3 attempts in total.
The same notification can come more than once: process it by pg_payment_id only once.
If the notification does not come, request Get payout status.

Request example#

The value of pg_xml for a successful payout from the payout page:
<?xml version="1.0" encoding="utf-8"?>
<response>
    <pg_status>ok</pg_status>
    <pg_payment_status>success</pg_payment_status>
    <pg_payment_id>4102</pg_payment_id>
    <pg_order_id>mp-dup-45684a</pg_order_id>
    <pg_balance>0</pg_balance>
    <pg_payment_amount>100</pg_payment_amount>
    <pg_to_pay>100</pg_to_pay>
    <pg_merchant_id>13991</pg_merchant_id>
    <pg_payment_date>2026-10-25 22:41:45</pg_payment_date>
    <pg_card_hash>4671-59XX-XXXX-8252</pg_card_hash>
    <pg_salt>ajdeWVuOaTfKygtW</pg_salt>
    <pg_sig>558577fd22bb9fdc6de7ccc8b605315f</pg_sig>
</response>
The value of pg_xml for a failed payout:
<?xml version="1.0" encoding="utf-8"?>
<response>
    <pg_status>error</pg_status>
    <pg_payment_status>error</pg_payment_status>
    <pg_payment_id>4105</pg_payment_id>
    <pg_order_id>page_decline-dc7023</pg_order_id>
    <pg_balance>0</pg_balance>
    <pg_payment_amount>100</pg_payment_amount>
    <pg_to_pay>100</pg_to_pay>
    <pg_merchant_id>13991</pg_merchant_id>
    <pg_payment_date/>
    <pg_card_hash>5325-34XX-XXXX-1311</pg_card_hash>
    <pg_failure_description>Заявка аннулирована</pg_failure_description>
    <pg_failure_code>10000</pg_failure_code>
    <pg_salt>6mogmrA8IYqgvvLg</pg_salt>
    <pg_sig>d52c0a682bc478b4d25cc65d6dfe5bc7</pg_sig>
</response>

Request

Header Params

Body Params application/x-www-form-urlencoded

Responses

🟢200Delivered
application/xml
Bodyapplication/xml

Example
<?xml version="1.0" encoding="utf-8"?>
<pg_status>ok</pg_status>
Previous
Check request
Next
Redirect back