API reference
Place an order
POST
Places an order as the online store’s checkout does: for pickup or delivery, paid now by link (payUrl) when the shop takes online payment, else at pickup or on delivery.
publishableKeyheader
AuthorizationBearer <pk_live_…>The shop’s publishable key, from Settings, Developers in Cashiar. Safe to use in a browser.
idempotency-key*stringIdempotency-Key?stringAny unique string (8–100 letters, digits, - or _). A retry with the same key gets the first answer instead of placing it twice.
application/json- body
customerName*stringLength
1 <= length <= 120customerPhone*stringdeliverTo?|Length
length <= 300deliveryZone?stringLength
length <= 60lines*array<>Items
1 <= items <= 50note?|Length
length <= 500fulfilment*stringValue in
"pickup""delivery"payNow?booleanDefault
falseapplication/json- response
id*stringnumber*stringtotal*numberpayUrl*string|nullwaiting*booleantrackUrl*string|nullcurl -X POST 'https://api.cashiar.app/v1/storefront/orders' \ -H 'idempotency-key: string' \ -H 'Content-Type: application/json' \ -d '{ "customerName": "string", "customerPhone": "string", "lines": [ { "variantId": "d53feca7-c65b-4741-aca7-827a42d686bf", "quantity": 0 } ], "fulfilment": "pickup"}'Example Response201
{ "id": "string", "number": "string", "total": 0, "payUrl": "string", "waiting": true, "trackUrl": "string"}