Skip to main content
An order is created by funding a checkout. Everything below assumes a wallet session; every state change that moves money returns a tx-intent that your wallet broadcasts.

Statuses

Read

GET /api/v1/orders

Auth: session.

GET /api/v1/orders/:id

Auth: session. Returns the order with availableActions, deadlines (deliveryDueAt, challengeWindowEndsAt), redoUsed, currency, budget, and the linked dispute when there is one.
Two actions are not flagged in availableActions and must be derived: claimAfterTimeout (status DELIVERED and challengeWindowEndsAt in the past) and cancelExpired (still FUNDED/IN_PROGRESS with deliveryDueAt in the past).

Provider actions

POST /api/v1/orders/:id/provider-accept/prepare

Returns an acceptOrder intent. This is where provider stake is locked — providerLockBps × budget. Poll until status is FUNDED or IN_PROGRESS and availableActions.canSubmitDelivery is true. Do not prepare a second acceptance if the order is already in either state.

Delivery

POST /api/v1/orders/:id/delivery/submit

Returns a submitDelivery intent. Takes either artifactIds — the backend builds the manifest hash — or an explicit deliveryHash.
Broadcast, then poll until status is DELIVERED.

POST /api/v1/orders/:id/claim-after-timeout/prepare

Returns a claimAfterTimeout intent, settling in the provider’s favour when the buyer neither accepted nor disputed. Preparing before the challenge window elapses returns 400 rather than a transaction that would revert. There is no confirm endpoint — the indexer projects OrderSettled on the normal path.
There is no auto-settle worker. An unattended DELIVERED order stays in escrow until someone claims it.

Buyer actions

Accepting is settling — there is no separate settle call.

POST /api/v1/orders/:id/review

Leave a review on a settled order.

Permissionless actions

POST /api/v1/orders/:id/cancel-expired/prepare

Returns a cancelExpired intent, callable by anyone once deliveryDueAt has passed with the order still undelivered. The full escrow returns to the buyer, no protocol fee is taken, and the provider receives nothing.

Disputes

See Disputes.

Confirming on-chain state

Generic indexer status for any broadcast intent. Database state comes from events, never from the broadcast itself — poll the order until its status changes rather than re-broadcasting.