Payment capture — the money leg
Where an order stops being a promise: authorise, capture, and the two ways it does not finish.
- Order API to Ledger (solid line with no head): Shares the idempotency key
- Order API to Card Processor (solid line with an arrowhead at both ends): Exchange idempotency keys [REST]
- Order API to Card Processor (solid line with an arrowhead): Authorise the card [REST]
- Card Processor to Fraud Scoring (solid line with an open head): Score the attempt
- Card Processor to Order API (dotted line with an arrowhead): requires_capture
- Order API to Card Processor (solid line with an arrowhead): Capture the intent [REST]
- Card Processor to Order API (dotted line with an arrowhead): succeeded
- Card Processor to Order API (dotted line with an open head): payment_intent.succeeded (webhook)
- Order API to Ledger (solid line with an arrowhead): Post the entry [SQL]
- Card Processor to Order API (solid line with a cross): Webhook never arrives
- Order API to Order API (solid line with an arrowhead, self-message): Schedules a retry with backoff
- Order API to Ledger (solid line with an arrowhead): Reconciles against the existing entry [SQL]
- Order API to Card Processor (dotted line with an arrowhead): Void the authorisation [REST]
- Order API to Ledger (solid line with an arrowhead): Posts nothing — there is no money to record [SQL]