Skip to main content

Payouts to mobile operators

API URL

https://paysys.uz/mobile/api

Warning

This section of the API is under development and can be changed.

General principles

The API is based on the REST API, where the method names are suffixes to the base URL.
For example, the info method is called by a POST request to the URL https://paysys.uz/mobile/api/info.

Each service has a limit on the number of requests per time period. 100 requests per minute by default.
If the request limit is exceeded, the system will return an error with HTTP code 429 and indication of the time period to resume requests in the header Retry-After.

Authorization and security

Cryptographic protocol is used for security TLS v1, TLS v1.1 или TLS v1.2.
In order to authorize, the payment instrument must send Auth HTTP header.

Http Header Auth

HTTP header: Auth: service_id-hash-timestamp

  • hashsha1(secret_key + timestamp)
  • timestamp - UTC Request signing time in milliseconds
  • service_id – Identifier of the payment instrument in the PaySys system. (Issued upon registration of the payment tool)
  • secret_key – Payment instrument key.(Issued upon registration of the payment tool)

Example of HTTP header:
Auth: 05e3bab097f42yu0a62ced0b-7f420a62c22fbe3bab09ed0b57874898-1399114284039

Failed request example

Request example CURL
curl -X POST --location "https://paysys.self/mobile/api/info" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Auth: 05e3bab097f42yu0a62ced0b-7f420a62c22fbe3bab09ed0b57874898-1399114284039" \
-d "{
\"id\": \"d5081c6b-ec14-464a-83b1-cebbfd1cd0fc\",
\"params\": {
\"phone_number\": \"998110010101\"
}
}"

Response contains:

{
"id": "d5081c6b-ec14-464a-83b1-cebbfd1cd0fc",
"error": {
"code": -32303,
"message": "Invalid phone format"
},
"result": null
}

Verification of phone number

Method's name: info
Authorization: requires

Validates a phone number and returns information about the mobile operator, as well as the minimum and maximum payment amount.

Request contains:

  • phone_number - Phone number in the international format
Request example
{
"id": "44db5b15-1fd6-4a6a-a76d-4ee5b0641846",
"params": {
"phone_number": "998933111010"
}
}

Response contains:

  • id - Merchant ID in the PaySys
  • name - Name of mobile operator
  • name_uz - Name of mobile operator in the Uzbek language
  • url -Link to mobile operator website
  • logo - Link to mobile operator logo image
  • description - Brief description/supporting information for payment
  • min_amount - Minimum replenishment amount, sum
  • max_amount - Maximum replenishment amount, sum
Response example
{
"id": "44db5b15-1fd6-4a6a-a76d-4ee5b0641846",
"error": null,
"result": {
"id": 100081,
"name": "Ucell",
"name_uz": "",
"url": "https://ucell.uz",
"logo": "https://paysys.uz/application/resources/img/ucell.jpg",
"description": "",
"min_amount": 1000,
"max_amount": 500000000
}
}

In case of invalid request parameters, the system will return an error.


Making a payment

Method's name: pay
Authorization: requires

Makes a payment to the number of the mobile operator.

Request contains:

  • phone_number - Phone number in the international format
  • payment_number - Transaction ID in the partner's payment system . Not required. If exists, it will check for the existence of a payment and return existing transaction if the payment has already been made.
  • amount - Payment amount, soum
Request example
{
"id": "fd7ecb3c-169b-4e4a-809c-62e18596d0cf",
"params": {
"phone_number": 2296344,
"payment_number": 1005641001,
"amount": 1000
}
}

Response contains:

  • transaction_id - Transaction ID in the PaySys
  • amount - Transaction amount in UZS, including commission
  • status - Payment status
    2 - Payment is completed
    1 - Awaiting of payment
    3 - Cancelled
    6 - Refund
    7 - Pending confirmation of debit (hold on customer's card)
    0 - Payment is created
    -1 - Error
  • date - Creation date of transaction in seconds
Response example
{
"id": "d5081c6b-ec14-464a-83b1-cebbfd1cd0fc",
"error": null,
"result": {
"transaction_id": 2355072,
"amount": 1000,
"status": 2,
"date": 1654499113
}
}

In case of invalid request parameters, the system will return an error.


Checking payment status

Method's name: status
Authorization: requires

Request contains:

  • transaction_id - Payment ID in the PaySys
Request example
{
"id": "9bcce9cf-c46e-45e8-9ac5-51bf8e9180e2",
"params": {
"transaction_id": 2355072
}
}

Response contains:

  • bank_transaction_id - Payment ID
  • amount - Amount of payment in soums
  • date - Creation date of transaction in seconds
  • status - Payment status
    2 - Payment is completed
    1 - Awaiting of payment
    0 - Payment is created
    -1 - Error
Response example
{
"id": "9bcce9cf-c46e-45e8-9ac5-51bf8e9180e2",
"error": null,
"result": {
"transaction_id": 2355072,
"amount": 1000,
"status": 2,
"date": 1654499113
}
}

In case of invalid request parameters, the system will return an error.