Oğuz Erol B2B Custom Web App System Blueprints
01 / 04 All Blueprints (4) Custom Web Apps Türkçe

4-Source POS, Bank & Corporate Card Reconciliation Architecture

A custom B2B reconciliation blueprint separating sales records, terminal batches, merchant statements, and bank credits to isolate just 6,170 in actionable differences across 2,070,000 in card sales alongside hold schedules and corporate card checks.

1. Four Collection Sources & The Reconciliation Equation

September fictional sample scope (3 channels, 2 acquirers: Main Store A, Online A, Held Branch B). Each source answers one distinct question.

Sales Record (ERP / Till / Order)

01
What did we sell, on which card, how many instalments?
Main Store · Acquirer A1,240,000
Online · Acquirer A350,000
Branch · Acquirer B480,000
Total Gross Sales2,070,000
Credit notes stay separate from gross ERP sales and match against statement refunds.

Terminal Batch / Online Gateway

02
Was the card actually charged, or voided?
Main Terminal Batch1,236,500
Online Gateway Report352,400
Branch Terminal Batch480,000
Marketplace EquivalentProvider tx report
Catches the 17 Sep -3,500 pre-batch void (Main) and +2,400 duplicate charge (Online).

Merchant Statement (Settlement)

03
What fee split applied, and when is payout due?
Credit Single (2.50%)616,500 → 15,412.50
Debit Card (1.00%)400,000 → 4,000
3-Instalment (6.00%)220,000 → 13,200
Charged (Main / Web)32,882.50 / 9,867.20
Main expected 32,612.50 vs charged 32,882.50 (+270 overcharge). Branch B: 0% fee, 30/15-day hold.

Bank Account Statement

04
What actual net cash landed, and on which date?
Main Store Credited1,189,267.50
Online Credited341,732.80
Branch Credited414,500
Main Statement Refund−12,000 (22 Sep)
Branch B: 286,000 + 45,500 + 52,000 + 31,000 = 414,500 (instalments paid monthly).
Server Database Rule Engine (PostgreSQL) 4 independent sources join at row level · date & rounding rules run deterministically
The Reconciliation Equation (Linking All Three Channels) September Sample Proof
Received = Terminal Gross − Fees − Refunds − Net Carried to Next Month + Net Released from Prior Month
Terminal Gross1,236,500− Fees−32,882.50− Refunds−12,000− Carried Hold−41,300+ Prior Month+38,950= Bank Credit1,189,267.50
Main Store · Acquirer ANext-Day + Fee
1,236,500 − 32,882.50 − 12,000 − 41,300 + 38,950 = 1,189,267.50
The −12,000 refund is a 22 Sep return of a 9 Sep sale; fee is assumed non-refundable here.
Online · Acquirer A2.80% Fee · Gateway
352,400 − 9,867.20 − 0 − 11,200 + 10,400 = 341,732.80
The 352,400 batch includes one 2,400 double charge on a single order; flagged for customer refund.
Branch · Acquirer BHeld · 0% Fee
480,000 − 428,000 (on hold) + 362,500 (prior months) = 414,500
The apparent 65,500 shortfall is not missing money; zero fees or refunds, 100% timing schedule.

2. Three-Bucket Variance Separator & Corporate Card Control (Only 6,170 Actionable Across 2,070,000 Sales)

At month-end, finance stops auditing 2,070,000 line by line; rules isolate actionable gaps from held cash and pair corporate card lines in parallel.

1. Differences Needing Correction

Total 6,170 · Action

Known causes that cannot close until assigned to an owner.

3,500 · Main Terminal Void17 Sep

Voided on the terminal before batch close (never hit acquirer statement), yet ERP invoice remained open (1,240,000 vs 1,236,500).

Owner: Branch cashier fixes ERP invoice; accounting approves.
270 · Overcharged Card Fee450 − 180

An 18,000 debit card sale was billed at the 2.50% credit rate instead of 1.00% (expected 32,612.50 vs 32,882.50).

Owner: Finance manager files an acquirer fee dispute.
2,400 · Duplicate ChargeOnline Gateway

Two successful charges posted to the same order ID (350,000 order log vs 352,400 gateway).

Owner: Accounting initiates refund; closes once settled.

2. Timing & Hold Items

Not an Error

Receivables not yet due; verified automatically when settlement date arrives.

428,000 · Branch B Held Receivables30/15 Days + Inst.

52,000 of September's 480,000 already cleared. On hold at 30 Sep: 300,000 credit (30d) + 48,000 debit (15d) + 80,000 in 4 monthly instalments.

Control: One expected receipt created per instalment; flags late only at due date + 1 day.
41,300 Main + 11,200 Online30 Sep → 1 Oct

Month-end and public holiday value-date shift on next-day payouts (e.g. a holiday shifts settlement to the next business day).

Control: Auto-checked on 1 October; triggers an alert only if still missing after due date.

3. Unexplained Gaps & Corporate Card Matching

Top of Queue

Any bank row fitting neither bucket jumps to the top of the queue. Spend totals and collection totals stay strictly separate.

Unexplained Bank Rows & P-209500 Variance

Zero unexplained POS items in this sample month. In parallel payout checking, batch P-209 (12,000 gross − 240 fee = 11,760 expected vs 11,260 credited) routes to finance with a 500 variance.

Rule: Fully allocated bank lines cannot be reused; P-208 (18,600) closed cleanly.
E-043 / K-103 · Corporate Card Match780 vs 790 = 10

Monthly spend log (4,830) vs card statement (4,840): E-041/K-101 (2,400) and E-042/K-102 (1,650) match cleanly; E-043/K-103 courier line has a 10 variance plus a missing receipt.

Owner: Expense owner uploads missing receipt; finance specialist verifies the 10 gap.

3. Deterministic Database Rules vs. Assistive AI Boundary & 4 Roles

Hard arithmetic and access guards run in deterministic SQL; AI acts strictly as a human-approved reading and candidate-pairing assistant.

Deterministic SQL Layer

Never Guesses
  • Totals & Fee/VAT Arithmetic: File uploads are rejected upfront if parsed line totals disagree with statement period totals.
  • Dated Fee-Table Versioning: Contract rate updates open a new effective version; prior months still audit against prior rates.
  • Rounding Tolerance & Rule Precedence: Exact ref (INV-107), amount+date window (TRX-18 · 1,250), pre-approved cent tolerance (52,418.40 vs 52,418.38).
  • Many-to-One Marketplace Payouts: 214 daily POS transactions or multi-order net payouts tie down to individual order IDs; one-to-many & partial matches supported.
  • Period Lock & Anti-Reuse Guard: Allocated bank lines cannot be double-counted; closed periods block silent edits.
Every confirmed match stores the exact rule name and approver inside the immutable audit record.

Human-Approved Assistive AI

Cannot Close Records
  • Receipt & Invoice Draft Extraction: Reads date, amount, merchant, and tax ID into draft inputs; uncertain fields highlight amber until a human confirms.
  • Statement Descriptor Candidate Pairing: Proposes likely matches between shortened merchant text and internal expense rows (such as E-043 / K-103).
  • Month-End Exception Brief: Summarizes unresolved gaps with direct links back to source rows; figures come from SQL tables, never model guesses.
Hard Stop: AI cannot close records, edit amounts or fee rates, rule on bank disputes or payouts, or lock an accounting period.

Field / Purchasing Staff

VisibleOwn monthly expense rows, uploaded receipts, and own missing-receipt queue
Write & ApproveDraft expense entry and fixing returned lines (e.g. E-043)
Locked / HiddenOther units' expenses, full corporate card totals, and fee agreements

Department / Unit Manager

VisibleDepartment expense lines and remaining unit budget balance
Write & ApproveUnit-level approval, clarification requests, and routing above-limit claims
Locked / HiddenAccounting period locks and other departments' records

Accounting / Finance Specialist

VisibleCorporate card statement rows, bank/POS feeds, and open variance queue
Write & ApproveLine matching, VAT/receipt verification, dispute tracking, and period reconciliation
Locked / HiddenSilent edits inside locked periods (cannot approve own match)

Finance Director / Management

VisiblePeriod summary, unresolved variances, overdue receipts, and full audit log
Write & ApproveFee/tolerance & limit rules, period locking, and final closing sign-off
Locked / HiddenLocked-period records cannot be overwritten; only formal adjustment entries apply