API Docs

Developerlar uchun zamonaviy qo‘llanma

Asosiy URL

https://apiurl.uz/api

1. To‘lov yaratish

Endpoint:

POST https://apiurl.uz/api

Parametrlar

ParametrTuriMajburiyTavsif
methodstringHarakat turi, `create` bo‘lishi kerak
amountintTo‘lov summasi (so‘mda)
shop_idstringKassa identifikatori
shop_keystringKassaga tegishli maxfiy kalit

So‘rov namunasi (PHP cURL)

<?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;
?>

Javob (JSON)

{
  "status": "success",
  "order": "test1234",
  "data": {
    "amount": "1000",
    "shop_id": "12345",
    "shop_key": "test12345"
  }
}

2. To‘lov holatini tekshirish

Endpoint:

GET https://apiurl.uz/{orderid}/status

Parametrlar

ParametrTuriMajburiyTavsif
orderidstringTo‘lov yaratishda qaytarilgan order

So‘rov namunasi (PHP cURL)

<?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;
?>

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