Retail · Case Study

Catch Payment and Refund Discrepancies Before Month-End

A settlement total is lower than the till total. That could be a fee, a timing difference, a refund or an absent payment. Matching the totals by forcing a tolerance would hide the distinction finance needs to investigate.

Explore Retail automation →

How can retailers automate payment reconciliation?

Import POS transactions, payment settlements and refunds into a traceable matching process. Normalize references, currencies and trading-day boundaries, then apply finance-approved deterministic rules. Separate matched records from pending settlements, known fees and unexplained differences. Each exception should retain the source rows and rule version. Automation can prepare evidence and review queues; finance must approve adjustments before accounting records change. No language model is needed for this implemented workflow.

reconciliation rulebook

Every match needs an explanation finance can inspect

A net settlement can be lower than a sale for a legitimate reason. It can also be missing money. The matching process has to preserve the source rows and distinguish a documented fee from an unexplained residual.

Rule 1

Keep the import reproducible

Load with reproducible boundaries

Hash imported files, retain immutable source copies and record source row numbers. Normalize timezones and trading dates without discarding original timestamps. Use fixed-precision currency amounts; do not compare binary floating-point totals.

Rule 2

Make the rule explicit

Match with explicit tolerances

Prefer unique transaction and processor references, then apply approved composite rules. Model fees, batched settlements, partial refunds and delayed capture separately. Currency-specific amount tolerances and settlement windows require finance approval. Ambiguous many-to-one matches remain unresolved rather than being greedily assigned.

Rule 3

Keep adjustments independent

Separate explanation from adjustment

Write the matched source IDs, rule version and residual difference into PostgreSQL. Metabase groups exceptions by missing record, duplicate reference, amount mismatch and expected timing. Reviewers can explain a discrepancy; an independent authorized finance process approves any ledger adjustment.

A matched record is not a write-off instruction.

A tolerance helps classify a difference. It does not grant permission to erase that difference from the ledger.

A high match rate is only half the reconciliation story

Read auto-matching alongside false matches and unresolved value. A rule that clears the queue by accepting weak matches creates work for the next close. No matching rates or savings are presented as achieved results.

Queue cleared

Auto-match rate

Unambiguous rule-matched eligible transactions divided by eligible transactions, reported alongside false matches.

Matches challenged

False-match rate

Incorrect matches in a finance-reviewed sample divided by sampled suggested matches.

What remains for finance

Unresolved value

Sum of unexplained residual amounts by currency and age, without netting currencies together.

Close preparation time

Finance minutes spent preparing review evidence per close, compared with a baseline period.

Technical details

A matching rule must explain its arithmetic

The reconciliation workbench preserves imported files, deterministic rules and review decisions as separate records. Explaining a fee does not authorize an adjustment.

PrefectSchedule runs and recover transient loads

Schedule runs and track retries.

File hash + source row + run reference
PythonNormalize timestamps and fixed-precision amounts

Normalize source exports and execute matching rules.

POS extractSettlement extractRefund extract
DuckDBEvaluate deterministic candidate matches

Analyze staged files and candidate matches.

sale = settlement + documented_fee

Currency tolerance and settlement windows come from approved finance rules.

PostgreSQLMatch evidence and reviewer decisions

Persist matches, exceptions and review decisions.

Source IDs, rule version and residual retained
MetabaseException reports for finance

Present reconciliation status and source evidence.

Missing, duplicate, amount and timing differences
Matching evidence does not authorize a write-off.
Simplified implementation architecture. Open a technology to inspect its responsibility.

Reproducible imports and adjustment authority

Use encrypted restricted staging storage with retention rules for original files. Limit write access to match decisions and retain an append-only decision history. Monitor file arrival, row counts, totals and unmatched value. Prefect retries transient loads; file hashes and transaction keys prevent a rerun from duplicating records.

Review false matches before increasing automation

Validate rules against a finance-labeled historical period. Include chargebacks, fees, daylight-saving changes, repeated files and split settlements. Run alongside the current close without posting adjustments; release only after finance approves the exception classifications and recovery procedure.

Interactive demo

Explain the difference between sale and settlement

Two sides of the same payment sit on a matching desk. Follow the fee bridge, then inspect the transaction whose settlement has not arrived.

Local interactive demo

Settlement matching desk

Fictional records
POS RECEIPTRM 100.00PAY-801
PROCESSOR SETTLEMENTRM 98.00Documented processor fee: RM 2.00
Adjustment authority remains with finance.
Reference records for this demo
POS and settlement matching
ReferenceSource amountsRuleMatch
PAY-801Sale 100 · net 98 · fee 2Documented feeMatched
PAY-802Sale 75 · settlement absentWindow exceededException
REF-221Refund 25 · posted next dayTiming rulePending
Interactive reconstruction using fictional records. All actions stay in this browser session. No client system, message, purchase, approval or invoice is changed.

Related implementation: explore another BytePilot workflow.

Fees, tolerances and adjustment approval

Should small differences be written off automatically?

No. Tolerances classify matching differences under approved rules. They do not authorize a write-off or ledger adjustment.

How are payment fees distinguished from missing money?

A fee must match an approved processor rule or source fee record. An unexplained residual stays in the review queue.

Can the process run before month-end?

It can run on an agreed daily schedule when exports are available, while preserving expected settlement delays as pending items.

Why use rules instead of AI?

References, currency arithmetic and accounting cutoffs need repeatable, auditable decisions. They are well suited to deterministic matching.

Related case studies

STOCK NETWORK / SKU-208Versioned stock
⌂STORE 01 / POSSale: −1v18
→
STOCK LEDGERv18Current accepted state
→
▦ONLINE STOREAvailabilityReservations + safety stock
Sale event / v18Apply once to the ledger ✓
Snapshot / v17Cannot replace a newer balanceDo not overwrite
Sample data · Interactive demo inside
Retail

Stop Selling Stock You Don't Have

Conflicting POS, warehouse and inventory quantities create overselling and manual reconciliation.

  • Azure Functions
  • Azure Service Bus
  • SQL Server
  • Power BI
View case study
T◉▤!
STORE 01 / MORNING BRIEFSample briefing

Before you open.

Two operational checks. One data warning.

01
Check SKU-208 availabilityInventory · below threshold
↗
02
Confirm transfer TR-81Receiving · receipt pending
↗
!
Warehouse feed is lateDo not infer stock from missing data
↗
Sample data · Interactive demo inside
Retail

The Store Manager's Daily AI Briefing

Store managers open multiple reports and message threads to find the issues needing action.

  • Microsoft Teams
  • Azure OpenAI
  • Power Automate
  • Dataverse
View case study

Discuss your reconciliation

Start with a settlement finance could not explain

Bring the POS row, the processor record and the rule someone used to investigate it. We can assess whether the gap is a source-data problem, a timing rule or a decision that needs finance review.

Discuss your reconciliation →

Data & Reporting · Choosing a workflow to automate

Transaction evidence

A matched example and an unresolved example

Matching policy

Fee schedules, settlement windows and tolerances