Skip to main content
POST
Headers: Authorization and Content-Type: application/json (required), and Idempotency-Key (optional, recommended).
The Idempotency-Key header is optional, but we strongly recommend sending it on every POST /orders so the same order is never created twice. When a request times out or the connection drops you cannot know whether the order was created. Repeat the request with the same key and the same email: you get the same order back (header Idempotent-Replayed: true) and are never charged twice. Keys are remembered for 24 hours. Reusing a key with a different email returns 422 idempotency_conflict.
Without the header the request still works and the duplicate-email check (409 duplicate_order) still applies, but we cannot recognise a retry as the same request. In particular, retrying a timed-out request that has allow_duplicate: true and no key can create and charge a second order.

Headers

string
Optional, recommended. 8-64 characters (letters, digits, _ . : -), for example a UUID. Prevents the same order from being created twice when you retry. Store it with your order so a retry reuses it.

Body

string
required
Buyer’s email. One address per order.
string
Optional. Used in the greeting (max 60 chars).
string
default:"en"
"en" | "id". Language of the email sent to the buyer: English or Indonesian. Default "en". Any other value is rejected with 400. This is independent of your account currency.
string
Your own order reference (max 64). Returned in responses and webhooks; searchable via the list endpoint.
boolean
true or false only. By default an email that received an invitation in the last 30 days is refused with 409. Set true to send again (charged). Re-sending is only allowed when the earlier invitation was one of your own orders; otherwise it is still refused with 409.

Response

Returns the order object with status 201 Created, plus balance: your balance after the charge.

Rejected by validation, 422 (nothing charged)

reason is a stable code you can branch on; note is a short human-readable explanation you can log or show.

Other failure responses

Every failure uses the same body, {"error":{"code","message","request_id"}}. Branch on code, not on message. A failed request never creates an order. Credit is charged only on 201. Other statuses (403, 404, 405, 413, 500) are listed under Errors.