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:
(1) When the order... | (2) state transitions to... | (3) and an ... event is emitted. |
---|---|---|
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.
charge isn't yet capturable and could still be pending fraud review
charge is capturable, but the order requires further fraud review, and, as a result, is still not ready to fulfill
charge is capturable, has passed fraud review or the Denied Parties List (DPL), and is ready to fulfill
fails because it is blocked by fraud review or the customer is determined to be on the DPL
blocked
is fully cancelled
is completely fulfilled or partially fulfilled and the remaining items[]
are cancelled
is fulfilled and the charge is fully captured or partially fulfilled with a partially captured charge and the remaining items[]
are cancelled or
the order charge is complete
complete
returned
order.refunded
charges are disputed
dispute