Skip to main content

Orders Overview

What an order is, who acts on it, and how it progresses to completion.

C
Written by Catalin Fetean
Updated over 3 weeks ago

Audience: PMs, Sellers, Buyers, Admins
Outcomes: Shared mental model of order states, responsibilities, and emitted events

What is an order?

The execution unit under an active contract. It owns milestones, deliverables, payments/escrow, acceptance, invoices, and the operational audit trail.

Lifecycle (canonical)

stateDiagram-v2 [*] --> Created Created --> DepositPending: payment requested DepositPending --> DepositPaid: webhook verified DepositPaid --> InProgress: work starts InProgress --> MilestoneReleased: payout (partial/whole) MilestoneReleased --> InProgress: next milestone InProgress --> Completed: all milestones done InProgress --> Disputed: formal dispute opened Disputed --> Resolved: refund/release/other Completed --> [*] Resolved --> [*]

Who acts

  • Member: upload deliverables, comment, request release

  • Admin/Owner: change policy fields, force-close, resolve disputes

  • Counterparty: accept/reject deliverables, open dispute

Events (high-level)

order.created, order.status.changed, deliverable.uploaded, deliverable.accepted, deliverable.rejected, milestone.released, payment.succeeded, payment.failed, dispute.opened, dispute.resolved.

Edge cases

  • Work must not start until DepositPaid (policy-dependent)

  • Dispute freezes payouts per policy until resolved

QA checklist

  • State transitions emit order.status.changed with previous/new state

  • Opening a dispute in InProgress moves to Disputed and blocks releases

Runbook: “Order stuck in DepositPending”

  1. Check provider webhook delivery & signature

  2. Replay event if necessary

  3. Inspect server logs with x-correlation-id and timestamp


Did this answer your question?