Dijla Store API
A REST API for resellers. Authenticate with an API key, read the catalogue, send top-up orders and track their status. Every order is paid from your prepaid USDT balance.
Overview
Base URL:
- All responses are JSON, encoded in UTF-8.
- All prices and balances are in USDT with four decimal places.
- Request bodies may be sent as JSON (Content-Type: application/json) or as form fields.
- Rate limit: 90 requests per 60 seconds per key.
- Timestamps are ISO 8601 in UTC.
Authentication
Create a key in your account under API keys. Each key has a public key ID and a secret shown only once. Send both on every request:
X-Api-Key: dk_xxxxxxxxxxxxxxxxxxxx X-Api-Secret: sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
A single header is also accepted:
Authorization: Bearer dk_xxxxxxxxxxxxxxxxxxxx:sk_xxxxxxxxxxxxxxxxxxxx
Keep the secret on your server. Requests without valid credentials return 401 UNAUTHORIZED. Revoking a key blocks it immediately.
Response format
Successful responses carry success: true and a data object:
{
"success": true,
"data": { "balance": 250.0000, "currency": "USDT" }
}
Failures carry success: false and an error object. Read error.code in your integration, not the message text:
{
"success": false,
"error": { "code": "INSUFFICIENT_BALANCE", "message": "Balance is not enough for this order." }
}
GET /profile
Returns the account behind the key and its current balance.
{
"success": true,
"data": {
"username": "reseller_iq",
"email": "reseller@example.com",
"balance": 512.5000,
"currency": "USDT",
"status": "active"
}
}
GET /products
Returns the live catalogue. Optional query parameter category accepts a category slug: pubg-uc, telegram-premium, telegram-stars, redeem-codes.
A single product is available at /products/{sku}.
{
"success": true,
"data": {
"count": 2,
"products": [
{
"sku": "PUBG-UC-660",
"name": "660 UC",
"category": "pubg-uc",
"price": 8.6000,
"currency": "USDT",
"input_type": "pubg_id",
"available": true,
"updated_at": "2026-09-01T10:12:00+00:00"
},
{
"sku": "TG-STARS-500",
"name": "500 Stars",
"category": "telegram-stars",
"price": 8.5000,
"currency": "USDT",
"input_type": "telegram_account",
"available": true,
"updated_at": "2026-09-01T10:12:00+00:00"
}
]
}
}
input_type tells you which fields the order needs:
- pubg_id - send player_id (8 to 15 digits).
- telegram_account - send telegram_username and telegram_name.
- none - send no target fields; the code is returned in delivery_code once the order is completed.
Code products also carry a stock field with the number of codes ready for instant delivery. It is null for every other product type. An order for a code product is completed and answered with its delivery_code in the same response while stock lasts; if the stock runs out the order is either kept pending for manual delivery or rejected with OUT_OF_STOCK, depending on the store configuration. Poll stock before large batches.
POST /orders
Creates an order and charges your balance immediately. The order starts as pending.
Body fields
- sku - required, product identifier.
- quantity - optional, 1 to 50, defaults to 1.
- player_id - required for pubg_id products.
- telegram_username and telegram_name - required for telegram_account products.
- client_ref - optional, up to 64 characters, unique per account. Sending the same client_ref twice returns the first order instead of creating a duplicate, which makes retries safe.
{
"sku": "PUBG-UC-660",
"quantity": 1,
"player_id": "512345678",
"client_ref": "shop-invoice-90211"
}
Response 201 Created:
{
"success": true,
"data": {
"order": {
"order_no": "DS260905A1B2C3D4",
"sku": "PUBG-UC-660",
"product": "660 UC",
"quantity": 1,
"unit_price": 8.6000,
"total": 8.6000,
"currency": "USDT",
"status": "pending",
"target": { "player_id": "512345678" },
"delivery_code": null,
"note": null,
"client_ref": "shop-invoice-90211",
"created_at": "2026-09-05T09:41:12+00:00",
"completed_at": null
},
"balance": 503.9000
}
}
GET /orders/{order_no}
Returns one order. You can also look an order up by your own reference with /orders?client_ref=shop-invoice-90211. Poll this endpoint until the status is completed or cancelled; every 30 to 60 seconds is enough.
{
"success": true,
"data": {
"order": {
"order_no": "DS260905A1B2C3D4",
"status": "completed",
"total": 8.6000,
"target": { "player_id": "512345678" },
"delivery_code": null,
"note": "660 UC delivered to the account",
"completed_at": "2026-09-05T09:52:40+00:00"
}
}
}
GET /orders
Lists your orders, newest first. limit is capped at 100. Filter by status: pending, processing, completed, cancelled.
GET /transactions
Lists balance movements: deposits, order charges and refunds, each with the balance after the movement.
Error codes
| HTTP | code | Meaning |
|---|---|---|
| 400 | INVALID_JSON | Body is not a valid JSON object. |
| 401 | UNAUTHORIZED | Missing, wrong or revoked credentials. |
| 402 | INSUFFICIENT_BALANCE | Top up the account before ordering. |
| 404 | PRODUCT_NOT_FOUND | No product with that sku. |
| 404 | ORDER_NOT_FOUND | No order with that order_no or client_ref. |
| 404 | ENDPOINT_NOT_FOUND | Unknown path. |
| 405 | METHOD_NOT_ALLOWED | Wrong HTTP method for the endpoint. |
| 409 | PRODUCT_UNAVAILABLE | Product is hidden or paused. |
| 409 | OUT_OF_STOCK | Not enough codes in stock for this code product. Nothing was charged. |
| 422 | MISSING_SKU | Field sku was not sent. |
| 422 | INVALID_PLAYER_ID | player_id must be 8 to 15 digits. |
| 422 | INVALID_TELEGRAM_USERNAME | 5 to 32 characters: letters, numbers, underscore. |
| 422 | INVALID_TELEGRAM_NAME | 2 to 64 characters. |
| 422 | INVALID_QUANTITY | quantity must be 1 to 50. |
| 422 | INVALID_CLIENT_REF | Up to 64 characters: letters, numbers, dot, dash, underscore. |
| 429 | RATE_LIMITED | Slow down and retry after the window. |
| 503 | MAINTENANCE | Ordering is paused. |
| 500 | SERVER_ERROR | Retry with the same client_ref; no duplicate is created. |
Order lifecycle
- pending - created and paid from your balance, waiting for our operator. Code products with stock skip this state and come back completed straight away.
- processing - the top-up is being executed.
- completed - delivered to the account. For code products the code is in delivery_code. When our operator attaches a proof screenshot, its address is returned in receipt_url; it is null when no proof was attached.
- cancelled - not delivered; the full amount is returned to your balance automatically.
Code samples
cURL
curl -X POST https://dijla-store.com/api/v1/orders \
-H "Content-Type: application/json" \
-H "X-Api-Key: $DIJLA_KEY" \
-H "X-Api-Secret: $DIJLA_SECRET" \
-d '{"sku":"PUBG-UC-660","player_id":"512345678","client_ref":"inv-1001"}'
PHP
$ch = curl_init('https://dijla-store.com/api/v1/orders');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-Api-Key: ' . getenv('DIJLA_KEY'),
'X-Api-Secret: ' . getenv('DIJLA_SECRET'),
],
CURLOPT_POSTFIELDS => json_encode([
'sku' => 'TG-STARS-500',
'telegram_username' => '@dijla_user',
'telegram_name' => 'Ali Hassan',
'client_ref' => 'inv-1002',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests
headers = {
"X-Api-Key": DIJLA_KEY,
"X-Api-Secret": DIJLA_SECRET,
}
order = requests.post(
"https://dijla-store.com/api/v1/orders",
json={"sku": "PUBG-UC-660", "player_id": "512345678", "client_ref": "inv-1003"},
headers=headers,
timeout=20,
).json()
status = requests.get(
f"https://dijla-store.com/api/v1/orders/{order['data']['order']['order_no']}",
headers=headers,
timeout=20,
).json()
Node.js
const res = await fetch("https://dijla-store.com/api/v1/orders", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Api-Key": process.env.DIJLA_KEY,
"X-Api-Secret": process.env.DIJLA_SECRET
},
body: JSON.stringify({
sku: "TG-PREM-3M",
telegram_username: "@dijla_user",
telegram_name: "Ali Hassan",
client_ref: "inv-1004"
})
});
const data = await res.json();
Integration checklist
- Store order_no against your own invoice and send client_ref so retries never double-charge.
- Treat any 5xx or network timeout as unknown: retry the same request with the same client_ref, then read the order back.
- Cache /products for a few minutes and refresh after price changes announced on the price updates page.
- Keep enough balance for peak hours; orders fail with 402 the moment the balance runs out.