Skip to main content
POST
Python

Authorizations

X-API-Key
string
header
required

Your API key, prefixed sc_live_ or sc_test_.

Headers

Idempotency-Key
string
required

A unique key so a retried request never places a second order. Reuse the same key to retry a call safely; reusing it with a different body is a conflict.

Body

application/json
lines
OrderLine · object[]

lines are the products to buy and how many of each. At least one is required.

reference
string

reference is an optional identifier you attach to the order to correlate it with your own system and look it up later. Reusing an Idempotency-Key with a different reference is a conflict.

maxTotal
Money · object | null

Money is an amount in a currency's minor units, together with the currency's ISO-4217 code and its number of decimal places, so the amount can be interpreted without assuming the currency. XOF (the West-African CFA franc) has no minor unit, so an XOF amount is a whole franc value.

Response

Success

order
order · object

order is the accepted order. It is settled from the wallet at placement, so it is born already paid: its status is "processing" while it is being fulfilled, or "completed" when fulfillment is immediate. It is never "pending" -- the developer API charges synchronously, so an order awaiting payment is not a state it produces. Poll the order to follow it to "completed".