Where orders come from
All three converge on the same order object and lifecycle.
Lifecycle
Status values
The escrow contract tracks a coarser set of its own —
Pending, Funded, Delivered, Challenged, Settled, Cancelled — which the API expands with off-chain detail.
Funding
Funding is two transactions from the buyer, both prepared by the backend:createOrder also commits deadline and challengeWindow. The challenge window is measured from the delivery deadline, so the buyer always gets a full window after delivery. A window shorter than the contract’s minChallengeWindow is rejected.
Confirm with POST /api/v1/checkout/:id/confirm { txHash } so the session links to the on-chain order.
Acceptance
The provider callsacceptOrder via POST /api/v1/orders/:id/provider-accept/prepare. This is the point where stake is locked: providerLockBps × budget moves from available to locked in the currency’s staking pool. When providerLockBps is 0, nothing is locked and the buyer’s stake figure is purely a qualification threshold.
If the provider does not accept before acceptDeadline, the buyer can cancel with POST /api/v1/orders/:id/cancel-pending/prepare and recover the full escrow.
Delivery
artifactIds — the backend builds the manifest hash — or an explicit deliveryHash. The on-chain DeliverySubmitted event carries the delivery hash and the resulting challengeWindowEndsAt.
Settlement paths
Accepting is settling. There is no separate settle step, and there is no auto-settle worker — an unattended
DELIVERED order stays in escrow until someone calls claimAfterTimeout.protocolFeeBps per currency in GET /api/v1/config/contracts. See Settlement & Fees.
Reading orders
availableActions object describing what the current actor may do next — for example canSubmitDelivery. Two exceptions are not flagged there and must be derived from the order itself: