Use our API to list reseller packages and place orders automatically. Every order is paid from your wallet balance, exactly like ordering on our website.
https://YOUR-API-DOMAIN/api/v1The API lets you do four things: check your wallet balance, list the reseller packages you can sell, place an order, and check the order status. It works with plain HTTPS and JSON, so it fits any language.
GET /products to see the package tag of every reseller package.POST /orders with the package tag and the player id.GET /orders/:orderId until the status is COMPLETED.Send your API key in the X-API-Key header on every request. You can also send it as Authorization: Bearer YOUR_API_KEY.
gtn_live_.IP_NOT_ALLOWED.Every response is JSON with a success flag. On success the result is inside data. On failure you get an error object with a stable code to handle in your code and a human readable message.
Rate limits: 120 requests per minute and 30 orders per minute for each key. When exceeded you get HTTP 429 with a Retry-After header (seconds).
/balanceReturns your current wallet balances.
| Field | Type | Required | Description |
|---|---|---|---|
| balanceNpr | number | No | Wallet balance in Rs. Rs orders are deducted from here. |
| balanceUsdt | number | No | Dollar balance. Used by accounts with USDT enabled. |
| rateType | string | No | NPR (Rs only), BOTH (Rs or USDT) or USDT (USDT only). |
/productsLists every reseller product with its packages (variants).
| Field | Type | Required | Description |
|---|---|---|---|
| id / slug | string | No | Product identifiers. |
| name | string | No | Product name. |
| image | string | null | No | Image path. Prefix it with our website address to build the full URL. |
| type | string | No | IDCODE (needs Player ID), VOUCHER (returns codes) or other top-up types. |
| playerIdLabel | string | No | What the playerUid means for this product, e.g. Player ID, UID or Phone number. |
| extraFields | array | No | Extra inputs some products need. Send them in extraFields when ordering. |
| variants[].tag | string | No | The package tag set by us. Send it as tag when placing an order. null means the package has no tag yet (use variants[].id). |
| variants[].id | string | No | Internal id. You can send it as variantId instead of the tag, but the tag is easier. |
| variants[].priceNpr | number | No | Price in Rs for 1 unit. |
| variants[].priceUsdt | number | null | No | Price in USDT, or null when the package has no USDT price. |
| variants[].inStock | boolean | No | false means the package cannot be ordered right now. |
/products/:idOrSlugReturns one reseller product by its id or slug.
Every reseller package with its tag and price. Copy the tag (or a ready order JSON) and use it in POST /orders. The tag is the Tag you set on the package in the dashboard. New reseller packages appear here and in the API automatically. The same list comes live from GET /products.
/ordersPlaces an order. The price is deducted from your wallet balance immediately.
| Field | Type | Required | Description |
|---|---|---|---|
| tag | string | Yes | Package tag from /products, e.g. ff-100-diamonds. (variantId also works if a package has no tag.) |
| product | string | No | Only needed when two products use the same tag: the product slug from /products. |
| playerUid | string | Yes | Player ID / UID / number to top up. |
| quantity | integer | No | A JSON number (not text). Default 1, max 100. The total is price × quantity. |
| clientOrderId | string | No | Your own unique reference (letters, numbers, . _ -, max 64). Sending the same value again never charges twice. |
| playerName | string | No | Optional in-game name, shown on the order. |
| server | string | No | Optional game server, if the game needs it. |
| region | string | No | Optional game region. |
| extraFields | object | No | Values for the product’s extraFields, e.g. {"Zone ID": "1234"}. |
| currency | string | No | Only for accounts with both Rs and USDT: send "USDT" to pay from the dollar balance. Default is NPR. Other accounts get an error if they send a currency they cannot use. |
clientOrderId that already exists, the response is HTTP 200 with "duplicate": true and the original order. Nothing is charged again, so it is safe to retry after a timeout./orders/:orderIdReturns one order. Use the numeric orderId, or your own clientOrderId.
codes: "codes": ["ABCD-1234-EFGH", "WXYZ-5678-IJKL"]/ordersLists the orders placed through the API, newest first.
| Field | Type | Required | Description |
|---|---|---|---|
| page | integer | No | Page number, default 1. |
| limit | integer | No | Items per page, 1 to 100, default 20. |
| status | string | No | Filter: PENDING, PAID, COMPLETED or CANCELLED. |
| Status | Meaning |
|---|---|
| PENDING | Order received and paid from your wallet. It is waiting to be delivered. |
| PAID | Payment confirmed and delivery is in progress. |
| COMPLETED | Delivered successfully. Voucher codes (if any) are in codes. |
| CANCELLED | The order could not be delivered. The amount is refunded to your wallet automatically. |
| Code | HTTP | Meaning |
|---|---|---|
| MISSING_API_KEY | 401 | No API key was sent. Add the X-API-Key header. |
| INVALID_API_KEY | 401 | The key does not exist, was regenerated or was deleted. |
| KEY_DISABLED | 403 | The key was disabled by support. |
| ACCOUNT_INACTIVE | 403 | Your account is suspended or deleted. |
| NOT_A_RESELLER | 403 | API access is only for reseller accounts. |
| IP_NOT_ALLOWED | 403 | The key has an IP allowlist and your server IP is not in it. |
| HTTPS_REQUIRED | 400 | Plain http:// was used. Always call the API with https://. |
| TOO_MANY_FAILED_ATTEMPTS | 429 | Too many wrong API keys from your IP. Wait for Retry-After seconds. |
| PRICE_NOT_AVAILABLE | 400 | The package has no valid price right now. |
| AMBIGUOUS_TAG | 400 | More than one package uses this tag. Also send the product slug in the product field. |
| RATE_LIMITED | 429 | Too many requests. Wait for the Retry-After seconds. |
| VALIDATION_ERROR | 400 | A field is missing or invalid. The message explains which. |
| PACKAGE_NOT_FOUND | 404 | No package with this tag, or it is not available to resellers. |
| INSUFFICIENT_BALANCE | 400 | Your wallet balance is lower than the order amount. Add money and retry. |
| OUT_OF_STOCK | 400 | The package is out of stock right now. |
| LIMIT_REACHED | 400 | A purchase limit for this product or Player ID was reached. |
| USDT_NOT_AVAILABLE | 400 | No USDT price or USDT is not enabled for your account. |
| ORDER_NOT_FOUND | 404 | No order with that id belongs to your account. |
| ORDER_FAILED | 400 | The order was rejected. The message tells the reason. |
| SERVER_ERROR | 500 | Something went wrong on our side. Retry with the same clientOrderId. |
Place an order in your favourite language.