Skip to main content

Create Instant Order 🆕

Facilitates the creation of a new order containing exactly one product with a quantity of one per request. Upon receiving the client request, the API will immediately initiate the order fulfillment process.

The API will briefly attempt to fulfill the order by checking existing inventory. If the requested product is available in stock, it reserves the product for immediate fulfillment and returns a response with status COMPLETED. Clients can then retrieve their code using the GetCodes API.

If the inventory lookup finds that the requested stock is unavailable, the API initiates an asynchronous fulfillment process. In this case, the API immediately returns a response with status PROCESSING. Clients are responsible for periodically polling the order status via the provided transaction ID until the order status transitions to COMPLETED, indicating availability for retrieval.

Note: The API does not maintain an active connection for up to 30 seconds anymore. It returns immediately after attempting the initial inventory lookup, responding with either a COMPLETED or PROCESSING status.

POST /v2/orders/instant​

Request​

HTTP Headers​

To use this endpoint, you must include the following headers for authentication and authorization:

HeaderTypeRequiredDescription
x-api-keyStringYesAPI key assigned to your account for service access.
AuthorizationStringYesBearer token to authenticate the API request.

Payload​

PropertyTypeRequiredDefault ValueDescription
clientOrderNumberStringNoNoneThe order number assigned by the client, used for tracking and reference purposes.
enableClientOrderNumberDupCheckBooleanNofalseEnable to prevent duplicate clientOrderNumber
skuStringYesThe Stock Keeping Unit identifier for the product.
payWithCurrency 🆕StringNo*NoneSettlement currency (ISO-4217). See rules below. Required only when the product currency is not in the customer’s balance currencies.

*payWithCurrency is required only when the product currency is not present in the customer’s balance currencies. If omitted otherwise, the system defaults to the product currency; if the customer has a single balance currency equal to the product currency, the default is applied automatically. If payWithCurrency is provided but not in the customer’s balances, the API returns UNSUPPORTED_CURRENCY.

Cross-currency settlement (payWithCurrency)​

Settle an order in a currency different from the product’s currency.

Property: payWithCurrency (ISO‑4217, e.g., USD)

Rules

  • If the product currency is in your balances and payWithCurrency is omitted, the order settles in the product currency (default).
  • If the product currency is not in your balances, payWithCurrency is required; omitting it returns UNSUPPORTED_CURRENCY.
  • If payWithCurrency is provided but not in your balances, the API returns UNSUPPORTED_CURRENCY.
  • If you have a single balance currency equal to the product currency, the system defaults to that currency; you may still override it.

Example Request​

POST /v2/orders/instant HTTP/1.1
Host: api.example.com
Content-Type: application/json
x-api-key: <API_KEY>
Authorization: Bearer <BEARER_ACCESS_TOKEN>

{
"clientOrderNumber": "1234",
"sku": "8PX-UF-Y5U"
}

Example Request (Cross-Currency)​

POST /v2/orders/instant HTTP/1.1
Host: api.example.com
Content-Type: application/json
x-api-key: <API_KEY>
Authorization: Bearer <BEARER_ACCESS_TOKEN>

{
"clientOrderNumber": "po-1234",
"sku": "TTR-WI-YWN",
"payWithCurrency": "USD"
}

Responses​

HTTP Status Codes​

Status CodeDescription
200OK
400Bad Request
409Conflict (e.g., duplicate clientOrderNumber when duplication check is enabled)
422Unprocessable Entity (e.g., invalid or missing payWithCurrency when required)
500Internal Server Error

Schema​

PropertyTypeNullableDescription
requestIdStringNoUnique identifier assigned to each request for tracking purposes.
dataOrderResponseNoOrder response.

OrderResponse​

PropertyTypeNullableDescription
transactionIdStringNoThe transaction identifier.
clientOrderNumberStringNoThe client's order number.
payWithCurrencyStringNoThe currency used to settle/charge the order.
grandTotalMoneyResponseNoThe grand total amount and currency.
createdAtStringNoTimestamp of when the order was created.
statusOrderStatusNoThe status of the order.
productsProductResponse[]NoList of products in the order.
fxSummaryFxEntry[]YesSummary of FX pairs/rates used when cross-currency conversion is applied. Omitted for same-currency orders.

ProductResponse​

PropertyTypeNullableDescription
skuStringNoThe SKU of the product.
quantityIntegerNoAlways 1 for Instant orders.
unitPriceOriginalMoneyResponseYesUnit price in the product’s native currency before FX. Optional; omitted when same-currency.
unitPriceMoneyResponseNoThe unit price of the product.
totalPriceMoneyResponseNoThe total price of the product.
statusOrderStatusNoThe status of the product.

MoneyResponse​

PropertyTypeNullableDescription
amountStringNoThe monetary amount.
currencyStringNoThe currency of amount.

FxEntry​

PropertyTypeNullableDescription
pairStringNoCurrency pair used (e.g., EUR/USD).
rateNumberNoApplied FX rate for the pair.
asOfDateStringNoISO date/time when the rate was effective.

OrderStatus​

ValueTypeDescription
PROCESSINGStringThe order is currently being processed.
COMPLETEDStringThe order has been completed successfully.
CANCELLEDStringThe order has been cancelled and will not be processed.

Example 200 OK Response​

{
"requestId": "c4c7b997-79a5-4bde-9f17-47ad7eac9ed4",
"data": {
"transactionId": "1234",
"clientOrderNumber": "po-1234",
"payWithCurrency": "USD",
"grandTotal": {
"amount": "9.75",
"currency": "USD"
},
"createdAt": "2025-10-06T09:00:00Z",
"status": "COMPLETED",
"products": [
{
"sku": "TTR-WI-YWN",
"quantity": 1,
"unitPriceOriginal": { "amount": "9.70", "currency": "EUR" },
"unitPrice": { "amount": "11.48", "currency": "USD" },
"totalPrice": { "amount": "11.48", "currency": "USD" },
"status": "COMPLETED"
}
],
"fxSummary": [
{ "pair": "EUR/USD", "rate": 1.1829, "asOfDate": "2025-10-06" }
]
}
}

Example Error Responses​

UNSUPPORTED_CURRENCY (product currency not in balances and payWithCurrency missing or not supported)

{ "error": "UNSUPPORTED_CURRENCY", "message": "payWithCurrency is required or not supported for this account." }

CLIENT_ORDER_NUMBER_DUPLICATE (dup-check enabled)

{ "error": "CLIENT_ORDER_NUMBER_DUPLICATE", "clientOrderNumber": "1234" }