Asosiy URL
https://danatchilar.uz/api
1. To‘lov yaratish
Endpoint:
POST https://danatchilar.uz/api
Parametrlar
| Parametr | Turi | Majburiy | Tavsif |
| method | string | ✅ | Harakat turi, create bo‘lishi kerak |
| amount | int | ✅ | To‘lov summasi (so‘mda) |
| kassa_id | string | ✅ | Kassa identifikatori |
| kassa_key | string | ✅ | Kassaga tegishli maxfiy kalit |
So‘rov namunasi (PHP cURL)
<?php
$url = 'https://danatchilar.uz/api';
$data = [
'method' => 'create',
'amount' => '1000',
'kassa_id' => '12345',
'kassa_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;
?>
Javob (JSON)
{
"status": "success",
"order": "test1234",
"data": {
"amount": "1000",
"kassa_id": "12345",
"kassa_key": "test12345"
}
}
2. To‘lov holatini tekshirish
Endpoint:
GET https://danatchilar.uz/{orderid}/status
Parametrlar
| Parametr | Turi | Majburiy | Tavsif |
| orderid | string | ✅ | To‘lov yaratishda qaytarilgan order |
So‘rov namunasi (PHP cURL)
<?php
$order_id = "test1234";
$url = "https://danatchilar.uz/{$order_id}/status";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
Javob (JSON)
{
"status": "success",
"order": "test1234",
"data": {
"amount": "1000",
"status": "pending",
"date": "2025-08-07"
}
}
3. Status qiymatlari
| Status | Tavsif |
| pending | To‘lov kutilmoqda |
| success | To‘lov amalga oshdi |
| failed | To‘lov muvaffaqiyatsiz tugadi |
| cancel | Foydalanuvchi tomonidan bekor qilindi |