Uzum FastPay payment
curl --request POST \
--url https://fbox.ngrok.io/payment/uzum \
--header 'Content-Type: application/json' \
--data '
{
"amount": 1000,
"qr_code": "7993:5061401:01KFDH7KB4KNBJD8QRVFBVQ39X:3sySIUxrog+hhtBwUXquxn97N5k="
}
'import requests
url = "https://fbox.ngrok.io/payment/uzum"
payload = {
"amount": 1000,
"qr_code": "7993:5061401:01KFDH7KB4KNBJD8QRVFBVQ39X:3sySIUxrog+hhtBwUXquxn97N5k="
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 1000,
qr_code: '7993:5061401:01KFDH7KB4KNBJD8QRVFBVQ39X:3sySIUxrog+hhtBwUXquxn97N5k='
})
};
fetch('https://fbox.ngrok.io/payment/uzum', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://fbox.ngrok.io/payment/uzum",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 1000,
'qr_code' => '7993:5061401:01KFDH7KB4KNBJD8QRVFBVQ39X:3sySIUxrog+hhtBwUXquxn97N5k='
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://fbox.ngrok.io/payment/uzum"
payload := strings.NewReader("{\n \"amount\": 1000,\n \"qr_code\": \"7993:5061401:01KFDH7KB4KNBJD8QRVFBVQ39X:3sySIUxrog+hhtBwUXquxn97N5k=\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://fbox.ngrok.io/payment/uzum")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 1000,\n \"qr_code\": \"7993:5061401:01KFDH7KB4KNBJD8QRVFBVQ39X:3sySIUxrog+hhtBwUXquxn97N5k=\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fbox.ngrok.io/payment/uzum")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 1000,\n \"qr_code\": \"7993:5061401:01KFDH7KB4KNBJD8QRVFBVQ39X:3sySIUxrog+hhtBwUXquxn97N5k=\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"payment_id": "bb75f609-6d97-4b45-9ed3-80e5fcd19ef1",
"payment_status": "SUCCESS",
"error_code": "0",
"error_message": null,
"client_phone_number": "998712565009"
},
"error": null,
"is_success": true
}{
"data": null,
"error": {
"code": 105,
"message": "The input has already been written to an output stream and can not be consumed again.",
"data": null
},
"is_success": false
}Платежи
Оплата Uzum FastPay
Инициация платежей через Uzum FastPay
POST
/
payment
/
uzum
Uzum FastPay payment
curl --request POST \
--url https://fbox.ngrok.io/payment/uzum \
--header 'Content-Type: application/json' \
--data '
{
"amount": 1000,
"qr_code": "7993:5061401:01KFDH7KB4KNBJD8QRVFBVQ39X:3sySIUxrog+hhtBwUXquxn97N5k="
}
'import requests
url = "https://fbox.ngrok.io/payment/uzum"
payload = {
"amount": 1000,
"qr_code": "7993:5061401:01KFDH7KB4KNBJD8QRVFBVQ39X:3sySIUxrog+hhtBwUXquxn97N5k="
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 1000,
qr_code: '7993:5061401:01KFDH7KB4KNBJD8QRVFBVQ39X:3sySIUxrog+hhtBwUXquxn97N5k='
})
};
fetch('https://fbox.ngrok.io/payment/uzum', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://fbox.ngrok.io/payment/uzum",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 1000,
'qr_code' => '7993:5061401:01KFDH7KB4KNBJD8QRVFBVQ39X:3sySIUxrog+hhtBwUXquxn97N5k='
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://fbox.ngrok.io/payment/uzum"
payload := strings.NewReader("{\n \"amount\": 1000,\n \"qr_code\": \"7993:5061401:01KFDH7KB4KNBJD8QRVFBVQ39X:3sySIUxrog+hhtBwUXquxn97N5k=\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://fbox.ngrok.io/payment/uzum")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 1000,\n \"qr_code\": \"7993:5061401:01KFDH7KB4KNBJD8QRVFBVQ39X:3sySIUxrog+hhtBwUXquxn97N5k=\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fbox.ngrok.io/payment/uzum")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 1000,\n \"qr_code\": \"7993:5061401:01KFDH7KB4KNBJD8QRVFBVQ39X:3sySIUxrog+hhtBwUXquxn97N5k=\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"payment_id": "bb75f609-6d97-4b45-9ed3-80e5fcd19ef1",
"payment_status": "SUCCESS",
"error_code": "0",
"error_message": null,
"client_phone_number": "998712565009"
},
"error": null,
"is_success": true
}{
"data": null,
"error": {
"code": 105,
"message": "The input has already been written to an output stream and can not be consumed again.",
"data": null
},
"is_success": false
}Обзор
Uzum FastPay Payment API используется для инициации платежа через Uzum’s FastPay system. Эндпоинт создает платежную транзакцию и возвращаетpayment_id
that must be used later for fiscalization.
Поля запроса
| Поле | Тип | Обяз. | Описание |
|---|---|---|---|
amount | integer | ✅ | Payment amount in sums |
qr_code | string | ✅ | Unique Uzum transaction identifier |
Поля ответа
✅ Успешный ответ 200
| Поле | Тип | Описание |
|---|---|---|
data | object | Данные ответа |
data.payment_id | string | Unique payment identifier |
data.payment_status | string | Payment status (SUCCESS, FAILED, etc.) |
data.error_code | string | Provider error code (0 on success) |
data.error_message | string | null | Error description (null on success) |
data.client_phone_number | string | Client phone number |
error | null | Error object (always null on success) |
is_success | boolean | Always true |
🚫 Ответ с ошибкой 400
Примечание: Даже при ошибке сервер возвращает HTTP 200.
| Поле | Тип | Описание |
|---|---|---|
data | null | No data returned |
error | object | Error details |
error.code | integer | Internal error code |
error.message | string | Понятное описание ошибки |
error.data | any | null | Additional error details |
is_success | boolean | Always false |
Тело
application/json
⌘I

