Marketplace platform CO-MKT-001 connects buyers with independent sellers for handmade goods. Commerce authority (platform database, simulated adapter COM-ADT-MKT-001, scope orders.write, inventory.atomicDecrement) owns order records and listing inventory. Payment provider Stripe Connect (simulated adapter PAY-ADT-MKT-001, scope charges.create, transfers.create, refunds.create, transfer_reversals.create) owns payment and transfer authority. Notification system NTF-MKT-001 (simulated adapter NTF-ADT-MKT-001, scope notifications.send) delivers buyer and seller alerts. Responsible operations owner: OPS-MKT-001.
System state at scenario start: COM-ADT-MKT-001 active. PAY-ADT-MKT-001 active. NTF-ADT-MKT-001 active. 850 active listings. 120 verified sellers with connected Stripe accounts. Platform version PV-MKT-002 deployed.
Purchase with distinct order, payment and transfer keys. Buyer BUY-MKT-010 purchases listing LST-MKT-0044 (Handmade Ceramic Vase, seller SLR-MKT-005, price $85, shipping $12, listing revision LST-MKT-0044-R2, quantity available 3). All three stable typed records share: tenant CO-MKT-001, buyer BUY-MKT-010, seller SLR-MKT-005, listing revision LST-MKT-0044-R2, preallocated order reference OP-MKT-010-ORD-001 and currency USD. Before any mutation, the platform assigns three distinct keys with that shared binding plus respective immutable payloads:
Order key OP-MKT-010-ORD-001 binding shared context + action order-create + listing LST-MKT-0044 + quantity 1 + payload hash PH-MKT-010-ORD-001.
Payment key OP-MKT-010-PAY-001 binding shared context + action buyer-charge + amount $97.00 USD (item + shipping) + method card-token-MKT-010-001 + exact predecessor order reference OP-MKT-010-ORD-001 + payload hash PH-MKT-010-PAY-001.
Transfer key OP-MKT-010-XFR-001 binding shared context + action seller-transfer + connected-account acct-SLR-MKT-005 + amount $82.45 ($97 total minus 15% platform fee of $14.55) + exact predecessor source-charge OP-MKT-010-PAY-001 + payload hash PH-MKT-010-XFR-001.
The platform first creates the order.
HELD-MKT-ORD-COMMITTED: 1/1 target. COM-ADT-MKT-001 creates order ORD-MKT-1240 for exact key OP-MKT-010-ORD-001 and atomically decrements listing quantity from 3 to 2 at same listing revision LST-MKT-0044-R2. Then the platform charges the buyer.
HELD-MKT-PAY-COMMITTED: 1/1 target. PAY-ADT-MKT-001 captures charge CHG-MKT-1240 for exact key OP-MKT-010-PAY-001, amount $97.00 USD, linked to committed order ORD-MKT-1240 at COM-ADT-MKT-001 at same listing revision LST-MKT-0044-R2 and immutable payload hash PH-MKT-010-PAY-001. Charge captured once. Then the platform initiates the seller transfer (immediately or upon order fulfillment, per marketplace policy).
HELD-MKT-XFR-COMMITTED: 1/1 target. The platform reconciles authoritative charge ID CHG-MKT-1240 at PAY-ADT-MKT-001 before initiating the transfer. PAY-ADT-MKT-001 creates transfer XFR-MKT-1240 for exact key OP-MKT-010-XFR-001, amount $82.45 USD to acct-SLR-MKT-005, linked to captured charge CHG-MKT-1240, committed order ORD-MKT-1240 and immutable payload hash PH-MKT-010-XFR-001. Transfer executed once. NTF-ADT-MKT-001 sends order confirmation to buyer and seller.
HELD-MKT-ORD-NONEXEC: 1/1 target. COM-ADT-MKT-001 returns explicit terminal NOT_CREATED for OP-MKT-010-ORD-001 matching shared binding and immutable payload hash PH-MKT-010-ORD-001. No order. Payment and transfer keys are never submitted.
HELD-MKT-PAY-NONEXEC: 1/1 target. Order committed but PAY-ADT-MKT-001 returns explicit terminal NOT_CAPTURED for OP-MKT-010-PAY-001 matching shared binding, exact predecessor order ORD-MKT-1240 and immutable payload hash PH-MKT-010-PAY-001. Order exists but unpaid. Transfer not initiated. Order marked payment-pending.
HELD-MKT-XFR-NONEXEC: 1/1 target. Order and payment committed but PAY-ADT-MKT-001 returns explicit terminal NOT_TRANSFERRED for OP-MKT-010-XFR-001 matching shared binding, exact predecessor charge CHG-MKT-1240 and immutable payload hash PH-MKT-010-XFR-001. Buyer was charged. Seller has not been paid. Marketplace operator is alerted for manual transfer resolution.
HELD-MKT-INCONCLUSIVE: 1/1 target. Timeout during order submission: the platform queries COM-ADT-MKT-001 for the exact order key OP-MKT-010-ORD-001. Timeout during payment or transfer: the platform queries PAY-ADT-MKT-001 for the exact payment or transfer key. Each authority is reconciled independently; the commerce order lookup is distinct from the payment or transfer lookup. No confirmed outcome for that operation. Subsequent operations not initiated. The platform holds until the responsible authority reconciles. Buyer sees: "We could not confirm your purchase. Please check your order status or contact support." Routes to OPS-MKT-001. NEG-MKT-AMBIGUOUS-NO-RETRY: 1/1 target. No retry prompt while outcome unknown.
Refund without automatic transfer reversal. BUY-MKT-010 requests a refund for ORD-MKT-1240. The marketplace operator approves a full buyer refund. The platform creates refund key OP-MKT-010-RFD-001 binding authorized operator OPR-MKT-001 + scope full-refund + exact order ORD-MKT-1240 + charge CHG-MKT-1240 + amount $97.00 USD + immutable payload hash PH-MKT-010-RFD-001 and verifies: exact authorized order ORD-MKT-1240 committed, captured charge CHG-MKT-1240 exists at PAY-ADT-MKT-001, refund amount $97.00 USD within refundable balance, all prior refund state for this charge and any alternate key accounted for, no pending refund effects. The platform issues the refund on CHG-MKT-1240 through PAY-ADT-MKT-001. Per Stripe Connect documentation, the refund on the charge does not automatically reverse transfer XFR-MKT-1240 to SLR-MKT-005. The marketplace operator independently decides whether to reverse the seller transfer. The reversal check verifies independently: exact transfer XFR-MKT-1240 exists, seller SLR-MKT-005 connected account acct-SLR-MKT-005 active, reversal amount $82.45 within reversible balance, all prior reversal state for this transfer accounted for. If reversal outcome is unknown, the platform holds. A distinct transfer reversal key OP-MKT-010-XFRRV-001 binding authorized operator OPR-MKT-001 + scope full-reversal + exact transfer XFR-MKT-1240 + connected-account acct-SLR-MKT-005 + amount $82.45 USD + immutable payload hash PH-MKT-010-XFRRV-001 is created and submitted only after operator approval. NEG-MKT-AUTO-REVERSE: 1/1 target. Refund and reversal are independent checks.
Expired listing denial. Listing LST-MKT-0099 (expiration 2026-12-01) has expired. BUY-MKT-020 has LST-MKT-0099 in their cart. At checkout, the platform queries the listing: expired. Cart flagged: "This listing has expired and is no longer available." Purchase denied. NEG-MKT-EXPIRED: 1/1 target.
Sold-out listing denial. Listing LST-MKT-0055 has quantity 0 (all items sold). BUY-MKT-025 attempts to purchase. Checkout gate denies: "This item is sold out." NEG-MKT-SOLDOUT: 1/1 target.
Listing revision conflict. BUY-MKT-010 added LST-MKT-0044 at revision R2 (price $85). The seller updates the price to $90 (revision R3). At checkout, the platform detects revision mismatch: cart has R2, current is R3. Buyer is informed: "The price for this item has changed. Please review before purchasing." Cart updated with current revision and price. NEG-MKT-REVISION: 1/1 target.
Webhook signature, replay and stale callback. The platform verifies the raw webhook body against the Stripe-Signature header using the endpoint signing secret (see https://docs.stripe.com/webhooks). An invalid signature rejects the webhook. Stripe delivers a charge.refunded webhook for CHG-MKT-1240 with event ID EVT-MKT-0099. The platform records the event ID. Before applying any downstream effect, the platform queries PAY-ADT-MKT-001 for the current exact charge and refund state of CHG-MKT-1240. The verified current state is applied. Downstream effects (notifications, entitlement changes) are deduplicated using the operation key OP-MKT-010-RFD-001. Stripe replays the same webhook (exact same event ID EVT-MKT-0099 and payload). The platform detects the event ID as already processed and discards the exact replay. Stripe then delivers a valid distinct older callback with event ID EVT-MKT-0088 carrying a charge.succeeded state for CHG-MKT-1240 (the pre-refund state arriving after the refund callback). Before applying any effect, the platform queries PAY-ADT-MKT-001 for the current authoritative charge state. PAY-ADT-MKT-001 reports the charge is already refunded. The platform discards the stale charge.succeeded callback because applying it would regress the recorded state. NEG-MKT-WEBHOOK-REPLAY: 2/2 targets. Exact replay discarded; stale distinct callback discarded after current authority check with no regression.
Mutation gate. Every first and retried order, payment and transfer rechecks: buyer session valid, listing available at current revision with sufficient quantity (orders), payment method valid (charges), seller connected account active (transfers), PAY-ADT-MKT-001 active with required capability. A listing, payment, account or connectivity mismatch suspends the operation.
Rollback trigger and restore. If PV-MKT-002 causes incorrect fee calculation, rollback to PV-MKT-001. All orders and listing inventory in COM-ADT-MKT-001 are preserved. All charges and transfers in PAY-ADT-MKT-001 (Stripe) are preserved. A connected account balance transfer to Stripe differs from a bank payout to the seller's external account; the platform tracks which state each transfer has reached. Listing and seller data unaffected.
Residual limits. Listing freshness depends on seller updates. Between updates, a recently modified listing may briefly display stale data; the checkout gate validates current state. Transfer timing depends on marketplace policy and Stripe processing times. Dispute resolution depends on operator review speed.
This is a hypothetical scenario for illustration. Actual scope, timeline and cost depend on your requirements.