- Base URL
https://api.rechargegame.games- Full reference
- api.rechargegame.games/docs — always current, also as plain text and OpenAPI
- Auth
X-API-Key: gv_live_…on every request. Create, replace or revoke it yourself in the dashboard under Profile → API access (reseller accounts)- Format
- JSON in, JSON out. HTTPS only.
- Rate limit
- 60 order creations per minute per key; status reads are not limited
What the API does
- Live price list —
GET /v1/productsreturns every pack at your price, each with aproduct_key. Send that key with an order and you are charged exactly that price. Details → - Safe retries — send your own order ID as
buyer_ref; sending it again returns the existing order, never a second one. Details → - Webhooks — we
POSTyour server the moment an order isdeliveredorfailed. Signed (Standard Webhooks) and retried for hours if your server is down. Set the address in Profile → Webhook. Details → - Batch orders — up to 25 orders in one call; each line succeeds or fails on its own. Details →
- Look up many orders at once — by our order IDs or by yours, 100 per request. Details →
- Free test mode — send
"test": true: nothing is charged or delivered, and the order completes by itself after about 10 seconds and fires your webhook, so you can build the whole flow first. Details → - Prepaid USDT balance — top up your balance; each order is charged when it is placed and refunded if it fails. Details →
- Protected from surprises — an order that has no price, or for a pack that is out of stock, is refused with a clear error. Nothing is created and nothing is charged.
How it works
- Your site reads
GET /v1/productsand shows the packs and prices. - It
POSTs an order with theproduct_key→ we get an instant alert. - The order is created as
pendingand you receive ourorder_id. - We fulfil it, then mark it
deliveredorfailed(a failed order is refunded to your balance). - We push the result to your webhook — or your site reads the
order_idand shows the live status.
Quick start
1. Verify your key
GET https://api.rechargegame.games/v1/ping
X-API-Key: gv_live_... { "ok": true, "buyer": "YourShopName" } 2. See what you can order
GET https://api.rechargegame.games/v1/products?game=free-fire
X-API-Key: gv_live_... { "currency": "USDT", "categories": [ { "slug": "free-fire", "name": "Free Fire", "kind": "topup",
"groups": [ { "slug": "brazil", "products": [
{ "name": "100 Diamonds", "price": 0.94, "delivery": "player_id",
"product_key": "topup/free-fire/brazil/100 Diamonds" } ] } ] } ] } 3. Submit an order
POST https://api.rechargegame.games/v1/orders
Content-Type: application/json
X-API-Key: gv_live_...
{
"product": "Free Fire 100 Diamonds",
"product_key": "topup/free-fire/brazil/100 Diamonds",
"region": "Brazil",
"quantity": 1,
"player_id": "51234567",
"buyer_ref": "SHOP-10231"
} | Field | Required | Notes |
|---|---|---|
product | yes | Text describing the product. Max 500 chars. |
product_key | recommended | From GET /v1/products — fixes the price you are charged. Without a matching key or product text, the order is refused (422 unknown_product). |
buyer_ref | recommended | Your order ID — makes retries safe. Max 200. |
region | no | e.g. EU, MENA, LATAM, Brazil. Max 100. |
quantity | no | 1–999, default 1. |
player_id | no | Player / account ID to top up. Max 200. |
server_id | no | Server or zone ID (required for Mobile Legends). Max 200. |
note | no | Any note for us. Max 1000. |
extra | no | JSON object with any additional fields you want recorded. |
test | no | true = free test order, nothing delivered. |
Response 201 — the order, as pending:
{
"order_id": "ORD-7K3M9Q",
"buyer_ref": "SHOP-10231",
"status": "pending",
"product": "Free Fire 100 Diamonds",
"region": "Brazil",
"quantity": 1,
"player_id": "51234567",
"delivery_note": null,
"failure_reason": null,
"created_at": "2026-10-02T08:36:33.722773Z",
"updated_at": "2026-10-02T08:36:33.722773Z"
} buyer_ref again returns 200 with the existing order — no duplicate alert, no double fulfilment. Treat both 200 and 201 as success and retry freely on network errors.4. Get told when it is done
Set your webhook address in the dashboard (Profile → Webhook). When an order becomes delivered or failed we POST it to you:
webhook-id: evt_3f9c...
webhook-timestamp: 1790925751
webhook-signature: v1,<base64 HMAC-SHA256>
{ "type": "order.delivered", "id": "evt_3f9c...", "created_at": "2026-10-02T08:42:31.5Z",
"data": { ...the same JSON as GET /v1/orders/{order_id}... } } Answer any 2xx within 10 seconds. Anything else is retried after 1 min, 5 min, 30 min, 2 h and 6 h. Keep a slow status check as a safety net: GET /v1/orders/ORD-7K3M9Q always tells the truth. How to verify the signature →
| Status | Meaning |
|---|---|
pending | Received, not yet fulfilled. |
delivered | Fulfilled — check delivery_note for any code or confirmation. |
failed | Could not be fulfilled — see failure_reason. Refunded to your balance. |
delivered and failed are final. If you poll instead of using a webhook, every 30–60 seconds is plenty. Listing: GET /v1/orders?status=pending, ?since=, ?limit=, ?ids=, ?buyer_ref=.
Errors
Every error, including validation errors, has one shape:
{ "error": { "code": "invalid_api_key", "message": "Invalid or disabled API key" } } | HTTP | Code | Meaning |
|---|---|---|
| 401 | missing_api_key | No X-API-Key header sent. |
| 401 | invalid_api_key | Wrong key or disabled account. |
| 403 | resellers_only | The API is for reseller accounts — contact us to be upgraded. |
| 404 | not_found | Order does not exist (or belongs to another buyer). |
| 400 | invalid_status | Bad status filter value. |
| 422 | invalid_request | Validation error — the message names the field. |
| 422 | unknown_product | No price found for that product. Nothing was created. Use a product_key from GET /v1/products. |
| 409 | out_of_stock | That pack is out of stock right now. Nothing was created or charged — choose another pack or try later. |
| 402 | insufficient_balance | Balance below the price. Nothing was created — load balance and retry with the same buyer_ref. |
| 429 | rate_limited | More than 60 orders/min — wait Retry-After seconds and retry. |
The full list is in the error reference.
Conventions
- HTTPS only — plain HTTP is not served.
- No trailing slash —
/v1/orders, not/v1/orders/(the latter 307-redirects, which some clients mishandle on POST). - Timestamps are ISO 8601 UTC with microseconds, always ending in
Z. Use a real ISO parser. - Timeouts: set ~20 s and retry with the same
buyer_ref.
Security
- Call the API from your server, never from a browser. Browser requests are blocked by design (no CORS) — a key in a browser is exposed to your own customers. Keep it in an environment variable.
- If a key leaks, replace or revoke it yourself in Profile → API access (up to 3 changes per hour), or contact us.
- Your key scopes every lookup to your own orders. Another buyer's order returns
404, not403.
Examples
Python
import os, requests
API = "https://api.rechargegame.games"
KEY = os.environ["GV_API_KEY"]
def create_order(product_key, product, player_id, region, buyer_ref):
r = requests.post(f"{API}/v1/orders", timeout=20,
headers={"X-API-Key": KEY},
json={"product_key": product_key, "product": product, "player_id": player_id,
"region": region, "buyer_ref": buyer_ref})
r.raise_for_status() # 200 and 201 are both success
return r.json()["order_id"] # 409 out_of_stock / 422 unknown_product raise here
def status(order_id):
r = requests.get(f"{API}/v1/orders/{order_id}", timeout=20,
headers={"X-API-Key": KEY})
r.raise_for_status()
return r.json()["status"] # pending | delivered | failed Node.js
const API = "https://api.rechargegame.games";
const KEY = process.env.GV_API_KEY;
export async function createOrder(body) {
// body: { product_key, product, player_id, region, buyer_ref }
const r = await fetch(`${API}/v1/orders`, {
method: "POST",
headers: { "X-API-Key": KEY, "Content-Type": "application/json" },
body: JSON.stringify(body),
});
if (!r.ok) throw new Error((await r.json()).error.message);
return (await r.json()).order_id;
} PHP
$ch = curl_init("https://api.rechargegame.games/v1/orders");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 20,
CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("GV_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
"product_key" => "topup/free-fire/brazil/100 Diamonds",
"product" => "Free Fire 100 Diamonds", "region" => "Brazil",
"player_id" => "51234567", "buyer_ref" => "SHOP-10231",
]),
]);
$order = json_decode(curl_exec($ch), true);