1. Invoice
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
    • Mobile balance
      • Overview
      • Init
      • Pay
      • Approve
      • Resend code
      • Status
    • Invoice
      • Overview
      • Recurring profile
        • Overview
        • Create
        • Execute
        • Cancel
        • Info
        • Notify
      • Tips
        • Overview
        • Create
      • Create
        POST
      • Info
        POST
      • Refund
        POST
      • Status
        POST
      • Cancel
        POST
    • 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
    • Saved cards
      • Get saved cards
      • Save card
      • Save card for payouts
      • Delete saved card
      • Save card without a charge
    • 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. Invoice

Refund

KZ
https://api.freedompay.kz
KZ
https://api.freedompay.kz
POST
https://api.freedompay.kz
/v5/merchant/invoice/refund
Returns money to the client for a paid invoice: fully or in parts.
Only an invoice in status success can be refunded, within 6 months after the payment.
For a partial refund, pass amount and currency. Several partial refunds are possible while their sum does not exceed the invoice amount.
Without amount, the full invoice amount is refunded: this works only if there were no refunds yet.
The invoice status stays success. Refunds are listed in refunds of Info.
If state_callback was passed, a notification with the new refund_id is sent.

Refund flow#

Result#

HTTPrefund_statusMeaningNext step
200successThe refund is completed.—
200processThe refund is in progress.Check refunds in Info later. A new refund is possible after this one is completed.
200errorThe payment system rejected the refund.See error_code and error_description.
400, 401, 422, 500—The request is rejected.See «Errors» below.

Errors#

The error is returned in error_description; error_code is returned for 401, 422 and for the 400 errors that have a code below.
HTTPerror_codeWhenWhat to do
4003001The invoice or its payment is not found.Check id.
4003004The invoice is not paid.Check the status with Status.
4003007The previous refund is still in progress.Repeat the request after it is completed.
4003008More than 6 months have passed since the payment.The refund is not possible.
4005001The refund amount exceeds the rest of the invoice amount.Reduce amount.
4019998The signature is invalid.Check the signature: see Overview.
4229403The X-JWS-Signature header is missing.Pass the signature.
500—A field is missing or invalid, for example currency with amount. error_description names the field.Fix the request.

Request

Header Params

Body Params application/jsonRequired

Example
{
    "id": "019d0652-4e2f-7f54-a179-007c80c48cef",
    "amount": 30,
    "currency": "KZT",
    "description": "Partial refund"
}

Responses

🟢200OK
application/json
Headers

Bodyapplication/json

Example
{
    "refund_status": "success",
    "refund_id": "019d0653-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
    "refund_created_at": "2026-10-29T17:59:29+05:00"
}
🟠400Bad Request
🟠401Unauthorized
🟠422Unprocessable Entity
🔴500Internal Server Error
Previous
Info
Next
Status