Skip to content

Order lifecycle

Every transition an order can make, the money movement and the event that goes with each, and what ends it.

An order starts processing and moves on its own. Every change raises its event and increases version by one. These pages promise no time for any of them: estimated_completion_at, when present, is an estimate.

Transitions

FromToMoneyEvent
Acceptedprocessingorder_reserve: moved from available to held.order.accepted, order.processing
processingsucceededorder_capture: the held amount is taken.order.succeeded
processingfailedorder_release: the held amount returns to available.order.failed, order.refunded
processingunder_reviewStays held.order.under_review
under_reviewsucceededorder_capture, once.order.succeeded
under_reviewfailedorder_release, once.order.failed, order.refunded

succeeded and failed are final. One reservation is captured once or released once, never both.

Unknown outcomes

  • A timeout means unknown. An order that cannot be confirmed stays held and goes under_review, with a status_reason such as outcome_unconfirmed or provider_conflict.
  • Money is never returned because time has passed. It moves only on a confirmed outcome.
  • Never order again to find out: a second order is a second payment.
  • Never treat a broadcast as delivered. Only succeeded means delivered.

Testing each transition

A nasfam_test_ username chooses the path, for either product:

UsernameWhat it does
nasfam_test_okSucceeds. Any ordinary username behaves the same.
nasfam_test_slowProcessing for about 2 minutes, then succeeds.
nasfam_test_slow_rejectedProcessing for about 2 minutes, then a verified failure; the hold is released once.
nasfam_test_rejectedA verified failure at once; the hold is released once.
nasfam_test_lost_ackThe provider's answer is lost; a lookup finds the delivery, which is captured once. Never sent twice.
nasfam_test_timeoutThe request never reaches the provider (UNKNOWN). Under review after 30 minutes, money held until two staff decide.
nasfam_test_unknownUnder review after 30 minutes, then a late success at about 35 minutes, captured once.
nasfam_test_conflictEvery provider answer names another recipient. Under review at once, money held until two staff decide.
nasfam_test_missingThe recipient check finds nobody. The quote, or a direct order, is refused and nothing is reserved.

Those timings belong to the sandbox's simulation. They say nothing about delivery on Live.