ENGINEERING NOTE 33 / 50 · CARD
Reconcile card activity across a month boundary
A purchase initiated in one month may settle or refund in another. Choose an accounting view explicitly and retain the event dates needed to explain both periods.
Published by OPEN RAMBO. The engineering patterns and pseudocode illustrate designs, not a documented product API. Numerical examples are illustrative.
Keep multiple dates
Authorization time, settlement time and posting time are distinct. Store them separately when available. A report filtered only by record creation time can move late-imported transactions into the wrong operational period.
Carry open items forward
List unresolved authorizations at period end and track their later settlement or reversal. Do not mark them as missing charges merely because the final event arrived after midnight on the first day of the next month.
Make revisions visible
A later refund can be shown as a current-period credit linked to the original purchase, depending on the chosen reporting policy. Preserve the original report version and describe revisions. Financial accounting treatment should follow the organization’s applicable policies.
Illustrative implementation
fields = ["authorized_at", "settled_at", "posted_at", "original_tx_ref"]
# Select one documented date basis for each report.Acceptance check
Test authorization on the last day and settlement on the next. Totals must reconcile without duplicating the purchase.