10 Reconciliation
| (require commerce/reconcile) | package: commerce |
Server processes explicitly require commerce/reconcile. Reconciliation actively reads provider order facts and compares them with the durable projection; it reports differences, it never mutates the projection.
struct
(struct reconciliation-difference (order-id code detail))
order-id : string? code : symbol? detail : string?
One bounded, redacted difference between the provider’s answer and the
recorded projection.
procedure
(reconcile-orders storage client orders)
→ (listof reconciliation-difference?) storage : commerce-storage? client : pancake-merchant-client? orders : (listof (cons/c string? pancake-order-binding?))
Actively reads each bound order and compares status, environment, and
amount with the projection. Differences are returned sorted by order id.