Freedom Pay
  1. Invoice
Freedom Pay
  • Overview
  • Gateway API
    • Overview
    • Sync API
      • Overview
      • Purchase
        • Overview
        • Create payment
        • Any amount
        • Card
        • 3DSecure
        • 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
        • create payment recurrent
      • read
        • read payment
        • read request
      • edit
        • edit payment.refund
        • edit payment.reverse
        • edit payment.clearing
      • delete
  • 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
      • 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 by order_id
      • Status by Payment ID
      • Status
    • Mobile balance
      • Overview
      • Init
      • Pay
      • Approve
      • Resend code
      • Status
    • Invoice
      • Overview
      • Init
        POST
      • Info
        POST
      • Pay
        POST
      • Status
        POST
    • SDK
      • JS SDK
      • Google Pay
      • Freedom QR
        • Reader SDK (Android)
        • Provider SDK (Android)
      • Payment SDK
        • iOS
        • Android
    • 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
    • Redirect back
      POST
    • Result notify
      POST
    • Payout notify
      POST
    • Check request
      POST
  • Card API
    • Overview
    • Payment Cards
      • Overview
      • Dictionaries
      • Bulk issue
      • Issue card
      • Issue plastic card
      • Activate card
      • Block card
      • Unblock card
      • Set PIN
      • Reset PIN counter
      • Close card
      • Update client
      • Card info
      • Balance
      • Secret data
      • Secret data (version 2)
      • Statement
      • Statement extended
      • Create client
      • Edit client
      • Сards' list
      • Request' status
      • Create transaction
      • Clearing transaction
      • Refund transaction
      • Transaction request' status
      • Transaction info
    • Gift Cards
      • Overview
      • List
      • Issue
      • Confirm
      • Resend
      • Resend code
      • Status
  • Partner API
    • Rates
      • Overview
      • Rates
    • Products
      • Overview
      • Dictionaries
      • Add client with product
      • Request status
    • E-Money
      • Overview
      • Add
      • Owner identification
      • Info
      • Close
      • Block
      • Balance
      • Statement
      • Request Status
    • Freedom ID
      • Overview
      • Design
      • iOS SDK
      • Android SDK
      • OAuth2
        • Authorization link
        • Token exchange
        • Token refresh
        • User info
        • Request profile
        • Get profile status
        • Create user
        • Update user
      • OIDC
        • Authorization endpoint
        • Token exchange
        • Userinfo
      • Error codes
      • Examples
        • Keycloak
    • Transfer
      • Overview
      • Get token
      • Refresh token
      • Get agents
      • Fees
      • Create person
      • Create business
      • Create transfer
      • Print application
      • Confirm
      • Search
      • Payout
      • Payout confirm
      • Cancel
      • Get person info
      • Get business info
      • Status
      • Info
    • Device ID
      • Android SDK
      • iOS SDK
  1. Invoice

Pay

POST
https://api.freedompay.kz/v5/merchant/invoice/pay
This method is the actual request to process the payment

Request

Body Params multipart/form-data
customer
string 
required
This parameter is displayed in the response to invoice/init - invoice_methods.qr.
Example:
kzobd2vgp17214143761774775392946
user_id
string 
required
User ID in the merchant system.
Example:
No65GFR755789T25642588
card_token
string 
required
Card token for payment with a saved card.
Example:
ef741cfc-f85e-41a0-84e6-2ba964912182

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.freedompay.kz/v5/merchant/invoice/pay' \
--form 'customer="kzobd2vgp17214143761774775392946"' \
--form 'user_id="No65GFR755789T25642588"' \
--form 'card_token="ef741cfc-f85e-41a0-84e6-2ba964912182"'

Responses

🟢200Success
application/xml
Body
status
string 
required
Shows the result of the query.
Status Description:
ok: Request was successful.
error: Request failed.
order_id
string 
required
Invoice identifier in the merchant system.
Example: 00102
invoice_status
string 
required
Invoice status.
Status Description:
new: New invoice.
process: Waiting for the payer or payment system.
ok: Invoice paid successfully.
failed: Invoice payment error.
invoice_id
integer 
optional
The unique identifier of the payment transaction in {{project}} serves as the key for all further work with the transaction.
Displayed only on invoice_status - ok, failed.
error_code
integer 
optional
Error code ID.
error_description
string 
optional
Text description of the error.
card_pan
string 
optional
Masked card number (part of the digits of the card number are hidden).
Example: 5483-18XX-XXXX-0293
Displayed only on invoice_status - ok, failed.
amount
number 
required
Invoice amount.
currency
string 
required
The currency in which the amount is indicated.
Example: KZT
Displayed only on invoice_status - ok, failed.
dt
string <date-time>
required
Date and time of the request. Format: YYYY-MM-DDThh:mm:ss±hh:mm.
Example
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <status>string</status>
  <order_id>string</order_id>
  <invoice_status>string</invoice_status>
  <invoice_id>0</invoice_id>
  <error_code>0</error_code>
  <error_description>string</error_description>
  <card_pan>string</card_pan>
  <amount>0</amount>
  <currency>string</currency>
  <dt>2019-08-24T14:15:22Z</dt>
</root>
Previous
Info
Next
Status