Developerlar uchun zamonaviy qo‘llanma
https://apiurl.uz/api
Endpoint:
POST https://apiurl.uz/api
| Parametr | Turi | Majburiy | Tavsif |
|---|---|---|---|
| method | string | ✅ | Harakat turi, `create` bo‘lishi kerak |
| amount | int | ✅ | To‘lov summasi (so‘mda) |
| shop_id | string | ✅ | Kassa identifikatori |
| shop_key | string | ✅ | Kassaga tegishli maxfiy kalit |
<?php
$url = 'https://apiurl.uz/api';
$data = [
'method' => 'create',
'amount' => '1000',
'shop_id' => '12345',
'shop_key' => 'test12345'
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
{
"status": "success",
"order": "test1234",
"data": {
"amount": "1000",
"shop_id": "12345",
"shop_key": "test12345"
}
}
Endpoint:
GET https://apiurl.uz/{orderid}/status
| Parametr | Turi | Majburiy | Tavsif |
|---|---|---|---|
| orderid | string | ✅ | To‘lov yaratishda qaytarilgan order |
<?php
$order_id = "test1234";
$url = "https://apiurl.uz/{$order_id}/status";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
{
"status": "success",
"order": "test1234",
"data": {
"amount": "1000",
"status": "pending",
"date": "2025-08-07"
}
}
| Status | Tavsif |
|---|---|
| pending | To‘lov kutilmoqda |
| success | To‘lov amalga oshdi |
| failed | To‘lov muvaffaqiyatsiz tugadi |
| cancel | Foydalanuvchi tomonidan bekor qilindi |