1. Installment
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
        • read payment
        • read request
      • edit
        • edit payment.refund
        • edit payment.reverse
        • edit payment.clearing
  • 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
      • Create invoice
      • 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
      • Get partners
        GET
      • Create application
        POST
    • 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. Installment

Overview

Description#

The Installment Service lets a merchant offer customers payment by installment, loan or any other pay-later product: the merchant submits an order and the customer's phone number and receives a tokenized redirect link for checkout; application status changes are delivered by webhook.

Request Header:#

NameValueDescription
X-Request-Iduuid v7Unique request Id
Content-typeapplication/jsonRequest body format
X-JWS-SignaturestringRequest signature
Acceptapplication/jsonRequest body format

Response Header:#

NameValueDescription
X-Request-Iduuid v7Unique request Id
X-DatetimedatetimeDate and time of request processing
X-Request-StatusstringRequest body format

Generating the X-JWS-Signature#

To send any request, a request signature must be generated using JWS technology.
The JWS format must include the mandatory blocks header and signature and should be passed in the request header X-JWS-Signature.

Header structure#

{
    "uri": "/v5/installment/applications",
    "auth_id": "12345", 
    "method": "POST",
    "params": "" 
    "alg": "HS256"
}
Header description:
FieldDescriptionField requirement
uriThe path to the API endpoint being calledRequired
paramsReserved fieldRequired
methodRequest methodRequired
auth_idUser ID for signature verificationRequired
algEncryption algorithmRequired

Payload structure#

The payload for generating JWS includes the HTTP request body.
The supported signature encryption algorithm is HS256, and the merchant's secret_key should be used as the signing key.
{
    "external_id": "TGR1234",
    "total_amount": 1500000,
    "currency": "UZS",
    "goods": [
        {
            "name": "Смартфон Xiaomi Poco F3 256/8GB",
            "price": 1500000,
            "quantity": 1,
            "category": "electronics"
        }
    ],
    "customer": {
        "phone": "eyJhbGciOiJQQkVTMi1IUzUxMitBMjU2S1ciLCJlbmMiOiJBMjU2R0NNIiwicDJzIjoiLi4uIiwicDJjIjo2NTUzNn0....."
    },
    "callback_url": "https://shop.uz/fp/status-callback"
}
Generated JWS:
eyJwYXRoIjoiL3Y1L21lcmNoYW50L2ludm9pY2UvaW5pdCIsIm1lcmNoYW50X2lkIjoxMjM0NTYsIm1ldGhvZCI6IlBPU1QiLCJwYXJhbXMiOiIiLCJhbGciOiJIUzUxMiJ9..wCwFCAmxN0nbTm6mad8GxowIjgkCwfF7IAy2ijO9thLjsZFXnS4K_I4NPnXjkTFTMnEzqjk8rtIVmtf7NbGyvg

Errors#

The service reports errors in three ways:
HTTP statusMeaningWhen it occurs
422Validation errorInvalid phone/JWE, invalid composition, amount outside the limits, or total_amount ≠ Σ(price × quantity)
500Internal server errorUnexpected server-side failure
200OKOn success; a business-level error may additionally be reported in the body via error_code / error_description (see below)
On a 200 response the following optional fields may be returned:
NameDescriptionData typeField requirement
error_codeError code IDintegerOptional
error_descriptionText description of the error (≤ 255 characters)stringOptional
Error codes:
error_codeDescription
1001Invalid request
1002Application not found
1003Invalid status transition
1004Application processing error
Previous
Live payments
Next
Get partners