Skip to content
Copper Lane Payments Read-only example

Resolve one payment without inventing its outcome

Resolve one payment without inventing its outcome

Details Pay for the €100 lamp, step pay-process

flow-pay-order details pay-process in uc-pay-order. Two start points distinguish the original request from a later processor event. Authored records reveal knowledge, not live telemetry.

  1. Start: Payment request arrives — Payment service.
  2. Record pay-1001 before calling the processor — Payment service.
  3. Submit pay-op-1001 with the same parameters — Payment service.
  4. Question: What does the available evidence establish? — Payment service. confirmed: go to 6; confirmed decline: go to 7; no answer before deadline: go to 8.
  5. End: Payment confirmed; the shop may fulfil — Checkout.
  6. Record the confirmed payment outcome — Payment service.
  7. On error: Confirmed decline; an explicit new attempt is possible — Checkout.
  8. Keep pay-1001 confirming; do not invent failure — Payment service.
  9. End: Show Confirming payment; outcome remains unknown — Checkout.
  10. Start: A processor confirmation arrives separately — Confirmation handler.
  11. Question: Was this confirmation identity already processed? — Confirmation handler. already processed: go to 12; new, compatible evidence: go to 13.
  12. End: Duplicate evt-9001; recorded outcome unchanged — Confirmation handler.
  13. Record the compatible confirmation and payment outcome — Payment service.