Skip to content

Place an order

POST
/v1/orders
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.

Media typeapplication/json
PlaceOrderRequest
object
product_code
required
string
<= 32 characters
player_id
required
string
<= 64 characters
server_id
string | null
<= 64 characters
idempotency_key
required
string
>= 8 characters <= 100 characters
max_price_sen

The most you agree to pay, in sen. If your current price is higher: PRICE_CHANGED, nothing charged.

integer | null
>= 1
Examplegenerated
{
"product_code": "example",
"player_id": "example",
"server_id": "example",
"idempotency_key": "example",
"max_price_sen": 1
}

Idempotent replay — the original order (also carries Idempotent-Replayed: true).

Media typeapplication/json
string
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.

Media typeapplication/json
string
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.

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "MISSING_API_KEY",
"message": "An API key is required. Send it as a bearer token."
}

RESELLER_INACTIVE or IP_NOT_ALLOWED.

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "RESELLER_INACTIVE",
"message": "This reseller account is deactivated."
}

IDEMPOTENCY_KEY_CONFLICT — the key was reused with a different payload.

Media typeapplication/json
object
error
required
string
message
required
string
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.

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "INSUFFICIENT_BALANCE",
"message": "Purchase Balance is insufficient for this order."
}

RATE_LIMITED — retry after the Retry-After header.

Media typeapplication/json
object
error
required
string
message
required
string
Example
{
"error": "RATE_LIMITED",
"message": "Too many requests. Retry after the period given in the Retry-After header."
}