Use explicit transitions to protect payment state when notifications arrive late or out of order.
Build the example
For a synthetic purchase, define created, authorized, captured, failed and disputed events. Decide which transitions can advance the aggregate and which require review. An authorization arriving after a confirmed capture should not lower the state. A chargeback should be modeled separately from a transient delivery failure.
Add a ledger event for an ambiguous transport timeout during capture. The attempted operation should remain visible while the payment is reconciled. An event received later can resolve that state after the expected identifiers and amount match. Keep the one-time notification effect keyed to the actual successful capture, independent of delivery ordering.
Out-of-order payment deliveries
Use explicit transitions to protect payment state when notifications arrive late or out of order.
Example
- Capture arrives
record a verified capture
- Authorization arrives later
retain capture
- Capture repeats
acknowledge without a second effect
acknowledge without a second effect
Watch the failure boundary
Keep provider events immutable and derive the current state separately. This lets a reviewer investigate a late event without losing the original sequence. Distinguish attempts from successful captures when deciding whether a second request is safe. When provider state and local rules disagree, retain the event for reconciliation with clear ownership.
Verify the behavior
Send captured, authorized and the same captured event again. Keep the capture applied exactly once. Then inject a mismatched currency and a capture with the wrong order reference. Both should be quarantined for review. Use a transaction or atomic conditional write for the transition and its event record.
Sources
Technical references checked .



