Asosiy URL

https://danatchilar.uz/api

1. To‘lov yaratish

Endpoint:

POST https://danatchilar.uz/api

Parametrlar

ParametrTuriMajburiyTavsif
methodstringHarakat turi, create bo‘lishi kerak
amountintTo‘lov summasi (so‘mda)
kassa_idstringKassa identifikatori
kassa_keystringKassaga 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

ParametrTuriMajburiyTavsif
orderidstringTo‘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

StatusTavsif
pendingTo‘lov kutilmoqda
successTo‘lov amalga oshdi
failedTo‘lov muvaffaqiyatsiz tugadi
cancelFoydalanuvchi tomonidan bekor qilindi
Asosiy Docs Support Bot