P
GMXAZ Bot API Workspace Public API · v1
Collection JSON OpenAPI JSON Environment JSON
AZ EN RU
▦Collection overview

GMXAZ Bot Public API collection

Select a request, fill in its parameters, and inspect the response in the same workspace.

Base URLhttps://gmx.az/api/v1
AuthorizationX-API-KEY
Rate limit60 / minute
CurrencyUSD

Introduction

The API provides catalog browsing, player validation, voucher and top-up ordering, order tracking, redeem checks, and signed customer webhooks. Provider details are internal and are never included in customer-facing API responses or webhook payloads.

Environment JSON is intentionally a variable file, not API documentation. Use Collection JSON, OpenAPI JSON, or Full API JSON for the complete integration reference.

Authentication and security

Send your private API key in the X-API-KEY header on every protected request. Keep it on your backend. Never expose it in browser code, Mini Apps, mobile bundles, or public repositories.

HTTP header
X-API-KEY: YOUR_API_KEY
Accept: application/json

Idempotency

Send a unique UUID in X-Idempotency-Key when creating an order. Repeating the same key with the same payload returns the existing order. Reusing it with a different payload returns IDEMPOTENCY_CONFLICT. In the generated Postman collection, keep the generated operation key unchanged for retries and clear it only when starting a new financial operation.

HTTP header
X-Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000

Order flow

  1. Load games, categories, and products. Read the current price, stock state, supported fields, and validation requirement.
  2. Validate the player when supports_player_validation is true or the product requires validation.
  3. Create the order with a UUID idempotency key and, when needed, callback_url plus callback_mode.
  4. Track the order through GET /order/{id}, GET /orders, or signed webhook events until a terminal status is reached.

Webhooks

When an API order includes callback_url, the platform sends signed JSON updates to that address. Webhooks contain only order, product, player, price, status, delivery, and customer-action fields. Upstream provider names, URLs, order IDs, and raw responses are never exposed.

Callback modes

legacy

Sends one final callback when the order reaches COMPLETED or CANCELED.

events

Sends signed lifecycle changes such as PENDING, PROCESSING, COMPLETED, and FAILED.

Webhook headers

HeaderDescription
X-EPINBULK-Signature-V2Recommended: sha256=HMAC_SHA256(timestamp + "." + event_id + "." + raw_json_body, webhook_secret). Use the timestamp and event-id headers shown above.
X-EPINBULK-Signature-Version2
X-EPINBULK-Signaturesha256=HMAC_SHA256(raw_json_body, webhook_secret)
X-EPINBULK-TimestampISO-8601 webhook delivery timestamp. Verify freshness when validating the V2 signature.
X-EPINBULK-Event-IdUnique UUID for the callback attempt.
X-EPINBULK-EventActual event name: order.status_changed or qr_login.*

Callback URL requirements

  • Only HTTPS URLs are accepted.
  • Only port 443 is accepted.
  • Private, reserved, and localhost addresses are blocked.
  • Credentials in the URL are not accepted.
  • Redirects are not followed.
  • The receiving server must return a 2xx response.

Retry schedule

1 → 1 minute → 2 → 5 minutes → 3 → 15 minutes → 4-6 → 60 minutes → 7-20 → 6 hours · Maximum 20 delivery attempts.

Legacy final webhook example

{
    "event_id": "47c8c6ba-16a5-4089-9f62-7ae1e51d4c0f",
    "order_id": 8821,
    "client_order_id": "order-10001",
    "status": "COMPLETED",
    "product_name": "Steam Wallet 10 USD",
    "qty": 2,
    "player_id": null,
    "player_name": null,
    "server_id": null,
    "region": null,
    "price": "19.9800",
    "currency": "USD",
    "delivery": [
        "CODE-ONE-XXXX",
        "CODE-TWO-XXXX"
    ],
    "manual_action_required": false,
    "delivery_message": null,
    "timestamp": "2026-07-25T13:31:10+04:00"
}

Events webhook example

{
    "event_id": "47c8c6ba-16a5-4089-9f62-7ae1e51d4c0f",
    "event": "order.status_changed",
    "callback_mode": "events",
    "order_id": 8821,
    "client_order_id": "order-10001",
    "product_id": 91,
    "product_name": "PUBG Mobile 60 UC",
    "product_type": "TOPUP",
    "game_id": 1,
    "game_name": "PUBG Mobile",
    "player_id": "51515969536",
    "player_name": "PlayerOne",
    "server_id": "1234",
    "region": "TR",
    "qty": 1,
    "price": "0.8800",
    "currency": "USD",
    "delivery": [],
    "manual_action_required": false,
    "delivery_message": null,
    "status": "COMPLETED",
    "message": "Order completed successfully.",
    "timestamp": "2026-07-25T13:30:10+04:00"
}

Signature verification

Calculate HMAC SHA-256 over the exact raw JSON request body using the webhook_secret credential issued with API access. Compare the result with the signature header shown in this documentation using a timing-safe comparison.

PHP
<?php
$secret = 'YOUR_WEBHOOK_SECRET';
$rawBody = file_get_contents('php://input');
$received = $_SERVER['HTTP_X_GAMEX_SIGNATURE'] ?? '';
$computed = 'sha256=' . hash_hmac('sha256', $rawBody, $secret);

if (!hash_equals($computed, $received)) {
    http_response_code(401);
    exit('Invalid signature');
}

http_response_code(204);

Status lifecycle

StatusTerminalDescription
PENDING No The order was created and is waiting for processing.
PROCESSING No The order is being processed.
COMPLETED Yes The order was completed successfully. Voucher delivery codes are returned when applicable.
FAILED Yes The order failed or was cancelled.
CANCELED Yes The order was cancelled.
REFUNDED Yes The amount was refunded to the balance.

Error codes

CodeHTTPDescription
API_DISABLED503Public API has been disabled by the administrator.
API_KEY_MISSING401The X-API-KEY header was not sent.
CLIENT_ORDER_ID_CONFLICT409The same client_order_id is already assigned to another order.
GAME_NOT_FOUND404The game was not found or is inactive.
IDEMPOTENCY_CONFLICT409The same idempotency key was reused with a different payload.
IDEMPOTENCY_KEY_INVALID422The idempotency key is invalid or longer than 128 characters.
IDEMPOTENCY_KEY_REQUIRED422A stable idempotency key is required for this operation.
INSUFFICIENT_FUNDS400The balance is insufficient for this order.
INVALID_API_KEY401The API key is invalid or disabled, or the customer is inactive.
INVALID_QUANTITY422The quantity exceeds the product or API limit.
IP_NOT_ALLOWED403The requesting IP address is not allowed.
ORDER_FAILED409The order could not be created or sent for processing.
ORDER_NOT_FOUND404The order was not found or belongs to another API user.
OUT_OF_STOCK409The order could not be created or sent for processing.
PLAYER_ID_REQUIRED422player_id is required for top-up orders.
PLAYER_NOT_FOUND404The player could not be validated and validation is required.
PRODUCT_NOT_FOUND404The top-up product was not found or is inactive.
RATE_LIMIT_EXCEEDED429The per-minute request limit has been exceeded.
REDEEM_CHECK_FAILED422The redeem check failed, the service is disabled, or the balance is insufficient.
SECURITY_ERROR400The callback URL does not meet the security requirements.
SERVER_ID_REQUIRED422server_id is required for this product.
VALIDATION_ERROR422The type or q parameter is invalid.
Error response shape
{
    "success": false,
    "error": {
        "code": "VALIDATION_ERROR",
        "message": "The product_id field is required.",
        "details": {
            "max": 1
        }
    }
}

Limits and retry behavior

Respect the configured per-minute limit. Retry 429 and temporary 5xx responses with exponential backoff. Do not create a new idempotency key when retrying the same order request.

Rate limit60 / minute
max_per_page100
max_voucher_qty500
max_topup_qty1
default_callback_modelegacy

Downloads and Postman files

Postman Collection JSON

Contains every endpoint, parameters, request bodies, successful responses, error examples, tests, idempotency handling, and webhook receiver examples.

Postman Environment JSON

Contains variables only. Import it together with the collection, then fill in x_api_key, webhook_secret, callback_url, and test identifiers.

OpenAPI JSON

Machine-readable OpenAPI 3.1 specification with paths, schemas, security, error responses, and webhook definitions.

Full API JSON

A complete export of the documentation model, including endpoints, parameters, examples, statuses, webhook policy, limits, errors, and changelog.

Request

Manage path and query parameters here.

KeyValueLocationDescription
API key
X-API-KEY
The key is kept only for the current page session.

System headers are added automatically.

HeaderValueDescription

Edit the JSON body.

Status: — Time: — Size: —
The response will appear here after the request is sent.