An Order has a defined lifecycle, each stage of which is represented by the
state attribute. Additionally, when the
state changes, an Event is created that represents that change. For example, when the
state changes from
order.fulfilled Event is created.
The following table lists the enumerated
state values and their associated webhooks in the approximate order they might occur in the lifecycle:
(1) When the Order...
(2) the state transitions to...
(3) and a ... webhook is emitted.
charge is not yet capturable (i.e., pending funds) and may be pending fraud
charge is capturable and may be pending fraud
charge is capturable and has passed fraud or the Denied Parties List (DPL)
is blocked by fraud or the DPL
is cancelled in full or part by the fulfiller
order.fulfilled (with cancelled quantity specified)
state values for a successful Order (i.e. the happy path) are as following:
complete . As the Order moves from one
state to another, a
StateTransitions marks the event with a timestamp.
The following diagram shows the possible
state values and the actions and events associated with each throughout the Order lifecycle:
An Order must also pass through a fraud review. When exactly that review occurs in the order lifecycle depends on the payment method used by the customer. The different stages of the review are represented by the
fraudState attribute, whose enumerated values are
passed. These various states also trigger their own corresponding Event.