Freedom Pay
  1. Token
Freedom Pay
  • Gateway API
    • Introduction
    • Reference
      • Test cards
      • Error codes
    • Sync API
      • Introduction
      • Page
        • Introduction
        • Page
        • Page with amount control
        • Status
      • Pay
        • Introduction
        • Card
        • 3DSecure
        • Cancel
        • Clearing
        • Refund
        • Status
      • Payout
        • Introduction
        • Card
        • IBAN
        • Balance
        • Status
        • StatusV2
      • Transfer
        • Introduction
        • Card
        • 3DSecure
        • Rates
        • Status
      • Card
        • Introduction
        • Add
        • 3DSecure
        • List
        • Remove
        • Status
      • Token
        • Introduction
        • Token Pay
        • Apple Pay
        • Google Pay
        • Samsung Pay
        • Token Payout
        • Status
    • Async API
      • Introduction
      • create
        • create payment
        • create payment recurrent
      • read
        • read payment
        • read request
      • edit
        • edit payment.refund
        • edit payment.reverse
        • edit payment.clearing
      • delete
  • Merchant API
    • Introduction
    • Reference
      • Test cards
      • Test phone numbers
      • Error codes
    • Page
      • Introduction
      • Page
      • Page with amount control
      • Payout page
      • Frame
      • Widget
      • Status
    • Pay
      • Introduction
      • Cancel
      • Clearing
      • Refund
      • Status
    • Payout
      • Introduction
      • IBAN
      • Balance
      • Status by order_id
      • Status by Payment ID
      • Status by Payment ID V2
    • Mobile balance
      • Introduction
      • Init
      • Pay
      • Approve
      • Resend code
      • Status
    • Card
      • Introduction
      • Add
      • Add for payout
      • Remove
      • List
      • Status
    • Token
      • Introduction
      • Saved card with CVC input (Init)
        POST
      • Saved card with CVC input (Pay)
        POST
      • Non-acceptance payments
        POST
      • Non-acceptance payments (Pay)
        POST
      • Token payout
        POST
      • Status
        POST
    • Invoice
      • Introduction
      • Init
      • Info
      • Pay
      • Status
    • Additional
      • Introduction
      • Check request
      • Result notify
      • Payout notify
      • Redirect back
  • Card API
    • Introduction
    • Payment Cards
      • Reference
        • Request Status
        • Client product
        • Card product
        • Card status
        • Card block
        • Transaction
        • Error codes
      • Card issue
        • Bulk
        • Single
        • Physical
      • Card control
        • Activate
        • Block
        • Unblock
        • Set PIN
        • Reset PIN counter
        • Close
        • Identification
        • Info
        • Balance
        • Secret data
        • Statement
      • Client
        • Create
        • Edit
        • Card list
      • Additional
        • Request status
    • Gift Cards
      • Introduction
      • Reference
        • Request status
        • Card status
      • List
      • Issue
      • Confirm
      • Resend
      • Resend code
      • Status
  • Partner API
    • Rates
      • Introduction
      • Rates
    • Products
      • Introduction
      • Reference
        • Request
        • Product
        • Freedom POS
        • Freedom ECOM
        • Freedom BOX
        • Limits
      • Add user
      • Add product
      • Add user with product
      • Grant user
      • Send auth data
      • Request status
    • E-Money
      • Introduction
      • Reference
        • Request
        • Operation
        • Error codes
      • Add
      • Owner identification
      • Info
      • Close
      • Block
      • Balance
      • Statement
      • Request Status
    • Freedom ID
      • Introduction
      • Android SDK
      • iOS SDK
      • Reference
        • Error codes
      • Link
      • Token
      • Token refresh
      • Info
      • Profile
      • Request
  • Mobile SDK
    • Payment SDK
      • iOS
      • Android
    • Freedom QR
      • Reader SDK (Android)
      • Provider SDK (Android)
  • CMS
    • Introduction
    • Get Merchant ID and key
    • WordPress
      • Introduction
      • Installation
      • Configuration
      • Test
      • Live payments
      • Update
    • Tilda
      • Introduction
      • Installation
      • Configuration
      • Test
      • Live payments
    • InSales
      • Introduction
      • Installation
      • Configuration
      • Test
      • Live payments
    • Ecwid
      • Introduction
      • Installation
      • Configuration
      • Test
      • Live payments
    • Bitrix
      • Introduction
      • Installation
      • Configuration
      • Test
      • Live payments
    • PrestaShop
      • Introduction
      • Installation
      • Configuration
      • Test
      • Live payments
    • OpenCart
      • Introduction
      • Installation
      • Configuration
      • Test
      • Live payments
  1. Token

Non-acceptance payments

POST
https://api.freedompay.uz/v1/merchant/{{paybox_merchant_id}}/card/init

Request

Body Params multipart/form-data
pg_merchant_id
string 
required
Merchant ID in the system {{project}}.
pg_amount
number 
required
Payment amount. Minimum 0.01.
Example:
100
pg_order_id
string 
required
Order ID in the merchant system.
Example:
12345
pg_user_id
string 
required
User ID in the merchant system.
Example:
No65GFR755789T
pg_card_id
integer 
optional
Card ID. (Deprecated). Required if no pg_card_token.
Example:
56
pg_card_token
string 
required
Card token. Required if no pg_card_id.
Example:
ef741cfc-f85e-41a0-84e6-2ba964912182
pg_description
string 
required
Order description.
Example:
Payment Description
pg_salt
string 
required
A random string consisting of arbitrary numbers and Latin letters.
Example:
some random string
pg_sig
string 
required
Request signature.
pg_receipt_positions[0][count]
integer 
optional
Product quantity.
Example:
2
pg_receipt_positions[0][name]
string 
optional
Product name.
Example:
Mouse pad
pg_receipt_positions[0][tax_type]
integer 
optional
Tax type. Possible values: 0 - Without tax
Example:
2
pg_receipt_positions[0][price]
number 
optional
Price per unit product.
Example:
1000
pg_user_email
string 
optional
Customer's email (specified during payment initialization).
Example:
mail@customer.kz
pg_user_phone
string 
optional
The user's phone number (starting with the country code). If not specified
Example:
77777777777
pg_user_ip
string 
optional
Client's IP address. Necessary for the analysis of disputable situations in case of suspected fraud.
Example:
127.0.0.1
pg_result_url
string 
optional
URL for message about payment result.
pg_success_url
string 
optional
URL to which the user is sent in case of successful payment. Required if not set in the store settings.
pg_failure_url
string 
optional
URL to which the user is sent in case of unsuccessful payment. Required if not set in the store settings.
pg_param1
string 
optional
Additional Information.
Example:
Additional Information
pg_param2
string 
optional
Additional Information.
Example:
Additional Information
pg_param3
string 
optional
Additional Information.
Example:
Additional Information
pg_idempotency_key
string 
optional
Idempotency key. Used to prevent duplicate request creation. A unique value within the merchant's scope; the same key cannot be used for different operations.
pg_loyalty_id
string 
optional
Identifier in the loyalty system.
pg_loyalty_amount
number 
optional
Amount of accrued units in the loyalty system.
pg_freedom_id
string 
optional
User identifier in the Freedom ecosystem.

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 -g --request POST 'https://api.freedompay.uz/v1/merchant/{{paybox_merchant_id}}/card/init' \
--form 'pg_merchant_id=""' \
--form 'pg_amount="100"' \
--form 'pg_order_id="12345"' \
--form 'pg_user_id="No65GFR755789T"' \
--form 'pg_card_id="56"' \
--form 'pg_card_token="ef741cfc-f85e-41a0-84e6-2ba964912182"' \
--form 'pg_description="Payment Description"' \
--form 'pg_salt="some random string"' \
--form 'pg_sig=""' \
--form 'pg_receipt_positions[0][count]="2"' \
--form 'pg_receipt_positions[0][name]="Mouse pad"' \
--form 'pg_receipt_positions[0][tax_type]="2"' \
--form 'pg_receipt_positions[0][price]="1000"' \
--form 'pg_user_email="mail@customer.kz"' \
--form 'pg_user_phone="77777777777"' \
--form 'pg_user_ip="127.0.0.1"' \
--form 'pg_result_url=""' \
--form 'pg_success_url=""' \
--form 'pg_failure_url=""' \
--form 'pg_param1="Additional Information"' \
--form 'pg_param2="Additional Information"' \
--form 'pg_param3="Additional Information"' \
--form 'pg_idempotency_key=""' \
--form 'pg_loyalty_id=""' \
--form 'pg_loyalty_amount=""' \
--form 'pg_freedom_id=""'

Responses

🟢200Success
application/xml
Body
pg_status
string 
required
Shows the result of the query
Status Description
ok — Request was successful,
error — Request was successful
pg_payment_id
integer 
required
The unique identifier of the payment transaction in {{project}}; serves as the key for all further work with the transaction.
pg_merchant_id
integer 
required
Merchant ID in the system {{project}}
pg_order_id
string 
required
Order ID in the merchant system
pg_salt
string 
required
Random string.
pg_sig
string 
required
Request signature.
Example
<?xml version="1.0" encoding="utf-8"?>
<response>
    <pg_payment_id>7999007883</pg_payment_id>
    <pg_merchant_id>9970</pg_merchant_id>
    <pg_order_id>12345</pg_order_id>
    <pg_status>ok</pg_status>
    <pg_salt>V9UG2EPB</pg_salt>
    <pg_sig>8f2e720a6b6f61c0575b6abbdcbcb567</pg_sig>
</response>
🟢200Error
🟢200Invalid Signature
Previous
Saved card with CVC input (Pay)
Next
Non-acceptance payments (Pay)