Place an order
const url = 'https://api.pekangame.space/api/reseller/v1/orders';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"product_code":"example","player_id":"example","server_id":"example","idempotency_key":"example","max_price_sen":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.pekangame.space/api/reseller/v1/orders \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "product_code": "example", "player_id": "example", "server_id": "example", "idempotency_key": "example", "max_price_sen": 1 }'Charges your Purchase Balance and submits the order for fulfilment. Send a fresh idempotency_key (UUID) per logical order: a replay with the same key and payload returns the original order with HTTP 200 and an Idempotent-Replayed: true header; the same key with a different payload is a 409 conflict. player_id and server_id must meet the game’s checkout_input contract from the catalogue, or the order is refused with VALIDATION_FAILED and nothing is charged. Optional max_price_sen caps the charge: if your current price is above it, the order is refused with PRICE_CHANGED (details.current_price_sen) and nothing is charged; a lower current price is charged as is. Omit it to accept the current price. It is not part of the idempotency payload.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The most you agree to pay, in sen. If your current price is higher: PRICE_CHANGED, nothing charged.
Examplegenerated
{ "product_code": "example", "player_id": "example", "server_id": "example", "idempotency_key": "example", "max_price_sen": 1}Responses
Section titled “Responses”Idempotent replay — the original order (also carries Idempotent-Replayed: true).
Example
{ "order_number": "PG-7QK2M9X4RJ", "product_code": "MLMY-86", "player_id": "123456789", "server_id": "2201", "price_sen": 6300, "payment_status": "paid", "delivery_status": "delivered", "wallet_refunded": false, "wallet_refund": null, "created_at": "2026-09-10T09:14:52+00:00", "delivered_at": "2026-09-10T09:15:07+00:00"}The order was placed.
Example
{ "order_number": "PG-7QK2M9X4RJ", "product_code": "MLMY-86", "player_id": "123456789", "server_id": "2201", "price_sen": 6300, "payment_status": "paid", "delivery_status": "delivered", "wallet_refunded": false, "wallet_refund": null, "created_at": "2026-09-10T09:14:52+00:00", "delivered_at": "2026-09-10T09:15:07+00:00"}MISSING_API_KEY or INVALID_API_KEY.
object
Example
{ "error": "MISSING_API_KEY", "message": "An API key is required. Send it as a bearer token."}RESELLER_INACTIVE or IP_NOT_ALLOWED.
object
Example
{ "error": "RESELLER_INACTIVE", "message": "This reseller account is deactivated."}IDEMPOTENCY_KEY_CONFLICT — the key was reused with a different payload.
object
Example
{ "error": "IDEMPOTENCY_KEY_CONFLICT", "message": "This idempotency_key was already used for an order with a different payload. Use a fresh key per logical order."}VALIDATION_FAILED (with details), PRICE_CHANGED (with details.current_price_sen, only when max_price_sen was sent), UNKNOWN_PRODUCT_CODE, NO_TIER_ASSIGNED or INSUFFICIENT_BALANCE.
object
Example
{ "error": "INSUFFICIENT_BALANCE", "message": "Purchase Balance is insufficient for this order."}RATE_LIMITED — retry after the Retry-After header.
object
Example
{ "error": "RATE_LIMITED", "message": "Too many requests. Retry after the period given in the Retry-After header."}