Skip to main content
POST
Create an order
Key: Write Scope: Company

Authorizations

Authorization
string
header
required

A store API key, sent as Authorization: Bearer <key>. Live keys are prefixed tbrn_live_. Keys are minted per store in the dashboard with an explicit scope set.

Headers

Idempotency-Key
string

Optional replay guard, 1–255 characters. Retrying a create with a key already used by this store returns the original resource instead of making a second one.

Required string length: 1 - 255

Body

application/json
items
object[]
required
Required array length: 1 - 20 elements
customerEmail
string<email>
Pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
extraContext
object
successUrl
string<uri>
Maximum string length: 2048
cancelUrl
string<uri>
Maximum string length: 2048
expiresIn
integer
Required range: 10 <= x <= 129600

Response

The order, with the checkout link to send the buyer. A replayed Idempotency-Key returns the original order with this same status.

id
string
required

Public short id — the value that appears in checkout links.

checkoutUrl
string
required
status
enum<string>
required
Available options:
pending,
completed,
partial,
expired
expiresAt
string<date-time>
required

ISO-8601 timestamp in UTC.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
items
object[]
required