Place an order

View as Markdown
Places an order for an item and charges your balance. Returns `201` immediately with `status: "pending"`; the final result arrives via your webhook and is readable from `GET /api/v1/orders/{id}`. ### Request fields - **`item_id`** (required) — the numeric item id. - **`quantity`** — required for **top-up** items (a decimal amount) and for **key** items (an integer count, defaults to `1`); **omit for service** items (always `1`). Must be within the item's min/max range. - **`merchant_order_id`** (optional) — your own idempotency/reference string, unique per account. - **`fields`** — required for **top-up** and **service** items only, keyed by the item's field names. Send a **text** field's value as a string; send a **choice** field's value as the **numeric choice id**. Key items take no `fields`. Discover an item's `item_id`, product type, quantity bounds and field definitions from the catalog export (see the **Placing orders** guide).

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
item_idintegerRequired
The numeric item id.
quantitydoubleOptional

Integer count for key items (default 1); decimal amount for top-up items (required); omit for service items.

merchant_order_idstringOptional<=100 characters

Your reference id, unique per account (optional).

fieldsmap from strings to anyOptional

Item input fields (top-up / service only), keyed by field name. Text fields take a string; choice fields take the numeric choice id.

Response

Order accepted; fulfillment is in progress.

idstringformat: "uuid"
The order id.
iteminteger
Numeric item id.
item_namestring
item_product_typeenum
quantitydouble
delivered_quantityinteger

Units delivered so far (relevant for key items / partials).

pricedouble
Amount charged, in major currency units.
refund_amountdouble

Amount refunded for undelivered units (partial / failed).

fieldsmap from strings to strings

The submitted input fields (choice values shown as their display name).

statusenum
errorstring

Machine error code when status = failed (e.g. OUT_OF_STOCK); otherwise empty.

error_messagestring

Human-readable error message when failed; otherwise empty.

codeslist of strings

Delivered key/code strings (key items only).

merchant_order_idstring
sourceenum
created_byobject or null
created_atdatetime
completed_atdatetime or null

Errors

400
Bad Request Error
401
Unauthorized Error