Process
Payment service
Owns logical operations and recorded state
Owns payment and refund operations, their stable keys and state transitions. Processor calls cross the network. Its confirmation component calls payment operations in-process.
- Inside
- Copper Lane Payments
- ID
part-payments
Outgoing
- Check the existing operation · Payment service → Fictional processor · Query · Network · Fictional processor operations A bounded, on-demand read asks the fictional processor about the existing operation. An unanswered lookup leaves the outcome unknown; it does not start another payment.
- Read and record payment state · Payment service → Payment records · Data · Network · Payment state storage Persist the logical payment, operation key, accepted outcome and processed confirmation identity. Repeating a delivery must not create another payment.
- Submit the same payment operation · Payment service → Fictional processor · Command · Network · Fictional processor operations The payment service calls the fictional processor with pay-op-1001 and identical parameters inside the authored 24-hour retry window.
- Submit the same refund operation · Payment service → Fictional processor · Command · Network · Fictional processor operations The payment service submits refund-op-1001 with identical refund parameters. A retry of that logical refund retains the key inside the fictional contract window.
Incoming
- Apply a compatible outcome · Confirmation handler → Payment service · Command · In-process · Apply confirmed outcome The confirmation component invokes payment operations in-process. Check event identity and logical operation before recording an accepted transition.
- Read the recorded answer · Checkout → Payment service · Query · Network · Payment service API Checkout reads the current logical payment. Confirming payment means its processor outcome is still unknown; it is not a failed charge.
- Request one logical payment · Checkout → Payment service · Command · Network · Payment service API Checkout supplies ord-1042 and EUR 10000. The payment service retains logical payment pay-1001 and operation key pay-op-1001.
- Request refund-1001 · Merchant support → Payment service · Command · Network · Payment service API Support requests EUR 10000 against pay-1001. refund-1001 uses its own operation key refund-op-1001 and initially remains requested.
- Read an order’s payment evidence · Merchant support → Payment service · Query · Network · Payment service API Support reads pay-1001 and its recorded source before deciding whether to request the refund. No bank balance or settlement observation is shown.
Use-case steps
Flows