The order lifecycle
Learn about the order lifecycle
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.
Order states and events
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:
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 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
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
.
Fraud review
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.
Last updated