Reference
Base URL: the same host as this docs site (your BFG API host).
Every request needs X-API-Key or
Authorization: Bearer <key>.
POST /orders).
Catalog — GET /services
Games and what each one needs in the order body (userId, zoneId, serverId, …). Unavailable games don’t show up.
Response: { "success": true, "services": [ ... ] }
Each service includes: productName, slug, gameName, required (array of field + label), status. Some lines may also include serverIdOptions or regionOptions when a server/region is required. Pack ids: Games & PIDs.
curl -X GET "/services" -H "X-API-Key: YOUR_API_KEY"
GET /products and /catalog
Alias: GET /catalog returns the same payload as GET /products.
The product database for ordering: one row per active pack with a stable
id (BFGPID). That value is what you pass as pid on
POST /orders. Rows include slug, gameName, serviceName, price, stock where applicable, etc.
For gamekey and giftcard (and PUBG stock packs), each row also includes
quantity = live available stock, plus inStock, quantityMin, and
quantityMax (capped by stock, max 500 per order).
curl -X GET "/products" -H "X-API-Key: YOUR_API_KEY"
// gamekey / giftcard example
{
"success": true,
"products": [
{
"id": "BFGPK60",
"slug": "gamekeypubg",
"gameName": "Game Keys — PUBG Mobile",
"serviceName": "60UC",
"category": "gamekeypubg",
"price": 0.858,
"quantityMin": 1,
"quantityMax": 42,
"inStock": true,
"quantity": 42,
"status": "active"
}
]
}
products[i].id from this response into the order body as pid (or PID).
GET /my-ip
Your public IP as our side sees it.
curl -X GET "/my-ip" -H "X-API-Key: YOUR_API_KEY"
// { "success": true, "ip": "203.0.113.4" }
GET /balance GET
Check your account balance (USD). Read-only; top up in Telegram.
curl -X GET "/balance" -H "X-API-Key: YOUR_API_KEY"
// 200
{
"success": true,
"balanceUsd": 12.5,
"currency": "USD"
}
POST /orders POST
Submit / create an order. Game is picked from the pid (catalog id).
On success you get the same invoice shape as GET /orders/:orderId.
Body (unified)
| Field | Notes |
|---|---|
pid / PID |
Required. BFGPID from GET /products → id. |
trxid (or trxId, idtrx, idTrx) |
Your id for the order. New purchase → new trxid. |
userId / userID |
Required for most games (player / uid / Riot ID / Zepeto username as defined by the line). |
zoneId |
Required for ML-style lines (numeric zone). |
serverId |
Required for WUWA / IDV / SOJ / PGR and similar. Once Human also accepts region shortcuts (eu, na, …). |
quantity |
Only for gamekey and giftcard kinds (1–500 per order). Over 500 → rejected with QUANTITY EXCEEDS MAX (no silent cap). |
idempotencyKey / idempotency |
Optional; if omitted, trxid is used for idempotency as implemented. |
curl -X POST "/orders" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"pid":"BFGP60","userId":"51234567890","trxid":"ORD-1001"}'
Responses — submit / processing / completed
orderCreated: true means the order was accepted. Poll
GET /orders/:orderId while status is processing.
Stop on completed or cancelled. Empty fields may be omitted.
Accepted — still processing (200)
{
"orderCreated": true,
"orderId": "BFG-API-PBG-A1B2C3-D4E5F6A7",
"status": "processing",
"game": "pubg",
"packName": "60 UC",
"amountUsd": 0.99,
"durationSec": 1,
"userId": "51234567890"
}
Completed (200) — instant fulfillment, or after polling
{
"orderCreated": true,
"orderId": "BFG-API-PBG-A1B2C3-D4E5F6A7",
"status": "completed",
"game": "pubg",
"packName": "60 UC",
"amountUsd": 0.99,
"durationSec": 34,
"userId": "51234567890"
}
Gamekey / gift card completed (200) — includes delivered codes
{
"orderCreated": true,
"orderId": "BFG-API-GK-A1B2C3-D4E5F6A7",
"status": "completed",
"game": "gamekey",
"packName": "60 UC Code",
"amountUsd": 0.95,
"durationSec": 2,
"codes": ["XXXX-XXXX-XXXX", "YYYY-YYYY-YYYY"]
}
Rejected at submit (400) — no order created
{
"orderCreated": false,
"status": "cancelled",
"game": "pubg",
"error": "INSUFFICIENT BALANCE"
}
Other submit failures
// 400
{ "success": false, "error": "INVALID BODY" }
{ "success": false, "error": "INVALID REQUEST" }
{ "success": false, "error": "UNKNOWN PID" }
{ "success": false, "error": "INVALID PACK" }
{ "success": false, "error": "GAME DISABLED" }
// 403 — trxid owned by another API user
{ "success": false, "code": "FORBIDDEN", "error": "FORBIDDEN" }
// 429 — same order still in flight
{ "success": false, "code": "DUPLICATE_IN_FLIGHT", "error": "DUPLICATE_IN_FLIGHT" }
// 503
{ "success": false, "code": "MAINTENANCE", "error": "MAINTENANCE" }
{ "success": false, "code": "API_ORDER_DISABLED", "error": "API_ORDER_DISABLED" }
Idempotent replay (200) — same trxid again
{
"orderCreated": true,
"orderId": "BFG-API-PBG-A1B2C3-D4E5F6A7",
"status": "completed",
"game": "pubg",
"packName": "60 UC",
"amountUsd": 0.99,
"durationSec": 120,
"userId": "51234567890",
"idempotentReplay": true
}
Walkthrough: Orders & status. Fixed subscription / CN PIDs: Games & PIDs.
Downtime: you may get 503 and MAINTENANCE or API_ORDER_DISABLED — see errors.
GET /history GET
Your last purchased history — recent orders for your account, newest first. Same invoice shape as
GET /orders/:orderId (and successful POST /orders). Single-order lookup:
GET /orders/:orderId.
Query: simple limit
Default limit=30 (min 1, max 200).
curl -G "/history" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "limit=25"
// 200
{
"success": true,
"count": 25,
"orders": [ { "orderId": "BFG-API-PBG-…", "status": "completed", "game": "pubg", ... }, ... ]
}
Query: pagination
Pass page to switch to paged mode (optional pageSize, default 20, max 50). Response
includes total and hasMore.
curl -G "/history" \
-H "X-API-Key: YOUR_API_KEY" \
--data-urlencode "page=1" \
--data-urlencode "pageSize=20"
GET /orders/:orderId
after POST /orders (see
Guides: lifecycle & examples).
GET /orders/:orderId GET
Check status for one order on your account. Same invoice fields as a successful POST /orders.
curl -X GET "/orders/BFG-API-PBG-A1B2C3-D4E5F6A7" \
-H "X-API-Key: YOUR_API_KEY"
Still processing (200)
{
"orderCreated": true,
"orderId": "BFG-API-PBG-A1B2C3-D4E5F6A7",
"status": "processing",
"game": "pubg",
"packName": "60 UC",
"amountUsd": 0.99,
"durationSec": 45,
"userId": "51234567890"
}
Completed (200)
{
"orderCreated": true,
"orderId": "BFG-API-PBG-A1B2C3-D4E5F6A7",
"status": "completed",
"game": "pubg",
"packName": "60 UC",
"amountUsd": 0.99,
"durationSec": 52,
"userId": "51234567890"
}
Cancelled / failed after placement (200)
{
"orderCreated": true,
"orderId": "BFG-API-PBG-A1B2C3-D4E5F6A7",
"status": "cancelled",
"game": "pubg",
"packName": "60 UC",
"amountUsd": 0.99,
"durationSec": 18,
"userId": "51234567890",
"error": "INVALID PLAYER",
"refunded": true
}
Not found (404)
{
"success": false,
"error": "ORDER NOT FOUND"
}
404 if the id does not belong to your account or does not exist.