The order lifecycle
Learn about the order lifecycle
Last updated
Learn about the order lifecycle
Last updated
An order has a defined lifecycle. Each stage of that lifecycle is represented by state
. When an order's state
changes, an event is created that represents that change. For example, when an order's state
transitions from accepted
to fulfilled
an order.fulfilled
event is created.
The following lists an order's enumerated state
values and the events associated with each state change. These state transitions are listed in the approximate sequence they might occur in an order's lifecycle:
isn't yet and could still be pending
charge is capturable, but the order requires further , and, as a result, is still not ready to fulfill
charge is , has passed or the (DPL), and is ready to fulfill
fails because it is blocked by or the customer is determined to be on the
blocked
is fully
is completely or partially fulfilled and the remaining items[]
are cancelled
is and the charge is fully or partially fulfilled with a partially captured charge and the remaining items[]
are or
the order
complete
is fully returned or partially returned and its remaining items[]
are or partially/fully
returned
order.refunded
are disputed
dispute
The state
values for a successful order (i.e. the happy path) are pending_payment
> in_review
> accepted
> fulfilled
> complete
. As the order moves from one state
to another, that event is recorded with a timestamp in stateTransitions
.
An order must also pass through a fraud review. When exactly this review occurs in an order's lifecycle depends on the payment method used by the customer. The different stages of the review are represented by fraudState
, whose enumerated values are review_opened
, blocked
, and passed
. When fraudState
changes, an event is created.