Dijla Store Dijla Store

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.

Get your API key

Overview

Base URL:

BASE https://dijla-store.com/api/v1
  • 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

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

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

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}

GET /orders/DS260905A1B2C3D4

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

GET /orders?status=pending&page=1&limit=20

Lists your orders, newest first. limit is capped at 100. Filter by status: pending, processing, completed, cancelled.

GET /transactions

GET /transactions?page=1&limit=20

Lists balance movements: deposits, order charges and refunds, each with the balance after the movement.

Error codes

HTTPcodeMeaning
400INVALID_JSONBody is not a valid JSON object.
401UNAUTHORIZEDMissing, wrong or revoked credentials.
402INSUFFICIENT_BALANCETop up the account before ordering.
404PRODUCT_NOT_FOUNDNo product with that sku.
404ORDER_NOT_FOUNDNo order with that order_no or client_ref.
404ENDPOINT_NOT_FOUNDUnknown path.
405METHOD_NOT_ALLOWEDWrong HTTP method for the endpoint.
409PRODUCT_UNAVAILABLEProduct is hidden or paused.
409OUT_OF_STOCKNot enough codes in stock for this code product. Nothing was charged.
422MISSING_SKUField sku was not sent.
422INVALID_PLAYER_IDplayer_id must be 8 to 15 digits.
422INVALID_TELEGRAM_USERNAME5 to 32 characters: letters, numbers, underscore.
422INVALID_TELEGRAM_NAME2 to 64 characters.
422INVALID_QUANTITYquantity must be 1 to 50.
422INVALID_CLIENT_REFUp to 64 characters: letters, numbers, dot, dash, underscore.
429RATE_LIMITEDSlow down and retry after the window.
503MAINTENANCEOrdering is paused.
500SERVER_ERRORRetry 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.