Introduction
Integrate voucher and top-up products into your own system using GamexBulk.Shop public JSON API. This page includes live playground blocks so resellers can verify their API key, test requests, inspect raw request bodies, and validate webhook signatures directly from the browser.
https://cdn.milliepin.az/api/v1
/games, /categories, and /products to build your browsing and purchase flow.
X-Idempotency-Key for retries and optionally send callback_url plus callback_mode.
legacy sends final updates only. events sends signed status-change webhooks.
Base URL & Versioning
All endpoints below are relative to https://cdn.milliepin.az/api/v1.
Version v1 is stable. Future breaking versions should use a separate prefix.
Authentication
Authenticated endpoints require your personal API key in the request header below:
X-API-KEY: YOUR_API_KEY
Idempotency
For order creation, send X-Idempotency-Key with a unique UUID. Reusing the same key
with the same payload safely returns the same order instead of creating duplicates.
X-Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000
Get Account Details
Retrieve reseller profile data, balance, currency, and personal webhook_secret.
curl -s "https://cdn.milliepin.az/api/v1/getMe" \ -H "X-API-KEY: YOUR_API_KEY" \ -H "Accept: application/json"
{
"success": true,
"data": {
"user_id": 579365494,
"username": "reseller_pro",
"balance": "1250.5000",
"webhook_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"currency": "USD"
}
}
No request yet.
Response will appear here.
Games
List available games that can be used to group or filter top-up products.
curl -s "https://cdn.milliepin.az/api/v1/games" -H "Accept: application/json"
{
"success": true,
"data": [
{
"id": 1,
"name": "PUBG Mobile"
},
{
"id": 2,
"name": "Mobile Legends"
}
]
}
No request yet.
Response will appear here.
Categories
List product categories. You may optionally filter by game_id.
| Query | Type | Required | Description |
|---|---|---|---|
game_id |
integer | NO | Filter categories for a specific game. |
curl -s "https://cdn.milliepin.az/api/v1/categories?game_id=1" -H "Accept: application/json"
{
"success": true,
"data": [
{
"id": 10,
"name": "UC Packages",
"game_id": 1
}
]
}
No request yet.
Response will appear here.
Products
List active products. Supports filters such as type, game, category, and IDs.
| Query | Type | Required | Description |
|---|---|---|---|
type | string | NO | voucher or topup |
game | string | NO | Search by game name |
category | string | NO | Search by category name |
game_id | integer | NO | Filter by game ID |
category_id | integer | NO | Filter by category ID |
page | integer | NO | Page number |
per_page | integer | NO | Maximum 100 |
curl -s "https://cdn.milliepin.az/api/v1/products?type=voucher&per_page=10" \ -H "Accept: application/json"
{
"success": true,
"data": [
{
"id": 55,
"name": "Steam Wallet 10 USD",
"game_id": 0,
"game": "",
"category_id": 3,
"category": "Gift Cards",
"type": "VOUCHER",
"price": "9.9900",
"stock_status": "FINITE",
"stock_count": 120,
"fields": []
}
],
"meta": {
"total": 1,
"per_page": 10,
"current_page": 1,
"last_page": 1
}
}
No request yet.
Response will appear here.
Validate Player
Validate the target player before creating a top-up order. This endpoint is only relevant for products that require player input.
| Field | Type | Required | Description |
|---|---|---|---|
product_id | integer | YES | Active top-up product ID |
player_id | string | YES | Player or user identifier |
server_id | string | NO | Server/zone/region value when needed |
input_2...input_8 | string | NO | Extra mapped input fields for advanced products |
curl -s "https://cdn.milliepin.az/api/v1/validate-player" \
-X POST \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"product_id": 91,
"player_id": "5123456789",
"server_id": "2001"
}'
{
"success": true,
"data": {
"nickname": "PlayerOne",
"nickname_verified": true,
"validation_optional": false
}
}
No request yet.
Response will appear here.
Create Order
Create a voucher or top-up order. For top-up products, validate the player first when required.
Use X-Idempotency-Key to avoid duplicates on retries.
| Field | Type | Required | Description |
|---|---|---|---|
product_id | integer | YES | Target product ID |
qty | integer | NO | Voucher quantity. Top-up orders must use 1. |
player_id | string | TOPUP | Required for top-up products |
server_id | string | NO | Optional second field for supported games |
input_2...input_8 | string | NO | Additional mapped inputs |
callback_url | string | NO | HTTPS webhook endpoint |
callback_mode | string | NO | legacy (default) or events |
Headers
X-API-KEY: YOUR_API_KEY X-Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000
Voucher order example
{
"product_id": 55,
"qty": 2,
"callback_url": "https://yourdomain.com/webhooks/gamexbulkshop",
"callback_mode": "legacy"
}
Top-up order example
{
"product_id": 91,
"qty": 1,
"player_id": "5123456789",
"server_id": "2001",
"callback_url": "https://yourdomain.com/webhooks/gamexbulkshop",
"callback_mode": "events"
}
Response
{
"success": true,
"data": {
"order_id": 8821,
"status": "PENDING"
}
}
callback_mode as legacy for old integrations.
Use events only if your webhook consumer is ready for PENDING,
PROCESSING, COMPLETED, and FAILED status updates.
No request yet.
Response will appear here.
Get Order Status
Fetch a single order by ID.
curl -s "https://cdn.milliepin.az/api/v1/order/8821" \ -H "X-API-KEY: YOUR_API_KEY" \ -H "Accept: application/json"
{
"success": true,
"data": {
"order_id": 8821,
"client_order_id": "7b8f0a64-4f7e-4a2f-9a0a-7b1f0a3bfa11",
"status": "COMPLETED",
"price": "19.9800",
"created_at": "2026-01-30T13:05:04+00:00"
}
}
No request yet.
Response will appear here.
List Orders
Retrieve your recent order list.
{
"success": true,
"data": [
{
"order_id": 8821,
"client_order_id": "7b8f0a64-4f7e-4a2f-9a0a-7b1f0a3bfa11",
"status": "COMPLETED",
"price": "19.9800",
"created_at": "2026-01-30T13:05:04+00:00"
}
]
}
No request yet.
Response will appear here.
Webhooks
If you send a valid callback_url while creating an order, webhook behavior depends on callback_mode.
| Mode | Behavior |
|---|---|
legacy |
Backward-compatible mode. Only one final reseller webhook is sent when the order reaches COMPLETED or CANCELED. |
events |
Status-change mode. Signed webhooks are sent for public lifecycle changes such as PENDING, PROCESSING, COMPLETED, and FAILED. |
- Voucher orders may finalize very quickly.
- Top-up orders may remain in
PROCESSINGbefore completion. - Event mode is best for automation flows that should react before final completion.
- When an order is later completed or canceled from the admin panel, the same saved
callback_urlis used for the final webhook. - Your webhook endpoint should answer with
2xxquickly and tolerate duplicate deliveries.
Signature Verification
Signed webhook requests include an HMAC header generated using your personal webhook_secret
from /getMe.
| Header | Description |
|---|---|
X-GAMEX-Signature | HMAC SHA-256 of the raw request body in format sha256=... |
X-GAMEX-Event | Present for event-mode webhooks. Current value: order.status_changed |
Content-Type | application/json |
$secret = 'YOUR_WEBHOOK_SECRET';
$payload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_GAMEX_SIGNATURE'] ?? '';
$computed = 'sha256=' . hash_hmac('sha256', $payload, $secret);
if (!hash_equals($computed, $signature)) {
http_response_code(401);
exit('Invalid signature');
}
http_response_code(204);
No calculation yet.
Result will appear here.
Payload Examples
Legacy final webhook example
{
"event_id": "47c8c6ba-16a5-4089-9f62-7ae1e51d4c0f",
"order_id": 8821,
"client_order_id": "7b8f0a64-4f7e-4a2f-9a0a-7b1f0a3bfa11",
"status": "COMPLETED",
"product_name": "Steam Wallet 10 USD",
"qty": 2,
"player_id": null,
"price": "19.9800",
"currency": "USD",
"delivery": ["CODE_1", "CODE_2"],
"timestamp": "2026-01-30T13:05:10+00:00"
}
Events mode webhook example
{
"event": "order.status_changed",
"callback_mode": "events",
"order_id": 8821,
"client_order_id": "7b8f0a64-4f7e-4a2f-9a0a-7b1f0a3bfa11",
"product_id": 91,
"product_name": "PUBG Mobile 60 UC",
"product_type": "TOPUP",
"game_id": 1,
"game_name": "PUBG Mobile",
"player_id": "5123456789",
"player_name": "PlayerOne",
"server_id": "2001",
"qty": 1,
"price": "0.8800",
"status": "PROCESSING",
"message": "Order is currently being processed.",
"timestamp": "2026-03-30T02:00:00+00:00"
}
Order Status Lifecycle
| Status | Description | Where used |
|---|---|---|
PENDING |
Order created and waiting for provisioning. | Event mode public webhook |
PROCESSING |
Provisioning started but not finalized yet. | Order responses and event mode webhooks |
COMPLETED |
Order delivered successfully. | All modes |
CANCELED |
Internal final failure state used by legacy/final flows. | Legacy final callbacks and order views |
FAILED |
Public failure name used by event mode webhook payloads. Treat it as a terminal canceled/failed order. | Events mode public webhook |
Error Codes
Use error.code for programmatic handling.
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "player_id is required."
}
}
Changelog
events webhooks are now dispatched when orders are completed or canceled after creation, including admin/manual status changes. Legacy webhook payload documentation was aligned with the stable payload shape.
callback_mode documentation, event-style webhook coverage,
signed status-change payload examples, and dynamic project branding from admin settings.