Rivane

Accounting
made smart

ERP Use CasesTier 1Published March 17, 2026

Auto-Match Payments via Bank Lockbox Import

Auto-Match Payments via Bank Lockbox Import for US and UK finance teams: ERP requirements, controls, audit evidence, data model, APIs, state transitions, and implementation checks.

Cash Application - Lockbox is where ERP discipline either begins or breaks.

Auto-Match Payments via Bank Lockbox Import looks operational from far away. In a real finance team, it is a chain of assertions: the right actor started the work, the required records existed, the control policy was applied, the state change was preserved, and the outcome can be explained later without rebuilding the transaction from emails and spreadsheets.

The expected business outcome is specific: > 90% of lockbox payments applied without manual intervention; same-day cash application; AR aging is accurate by morning.

The control flow a finance team actually needs.

Workflow map showing control steps, exceptions, and evidence for this ERP process.Lockbox File Imp...Start conditionMatch Scoring Ev...Required checksTolerance Thresh...Owner and SLAAuto-Applied Pay...System updateUnmatched Cash N...Exception handlingAudit packetEvidence trailException loopCash Application - Lockbox should preserve every override and rejection.
Workflow map for this ERP process, including exception handling and audit evidence.

Step 1

Lockbox File Import Be Idempotent

Step 2

Match Scoring Evaluate Invoice Number,...

Step 3

Tolerance Threshold Be Configurable Per...

Step 4

Auto-Applied Payments Create GL Entries...

Step 5

Unmatched Cash Not Age As AR

The ERP surface involved.

Module

Cash Application - Lockbox

Actors

Bank Lockbox File, Cash Application Engine, AR Clerk

Tier

Tier 1

Finance area

Accounts Receivable & Order-to-Cash

Region lens

US and UK finance teams

Publication date

March 17, 2026

Lockbox file import must be idempotent (re-import same file produces no duplicate postings); match scoring must evaluate invoice number, PO number, amount, and customer name; tolerance threshold must be configurable per entity; auto-applied payments must create GL entries identical to manual application; unmatched cash must not age as AR; match audit trail must record rule that triggered match; non-functional: 10,000-line lockbox file must process in < 60 seconds.

US and UK teams have different compliance hooks, but the same control problem.

US teams usually care about clean evidence for audit support, vendor records, payment controls, tax reporting, and management review. UK teams usually care about VAT-ready records, approval evidence, digital-record discipline, and traceable postings. The country-specific details differ, but the operating pattern is the same: the ERP needs controlled records, explicit ownership, defensible state changes, and evidence that survives beyond the person who completed the task.

The control matrix.

Control areaRequirementAcceptance proof
Control 1Lockbox file import must be idempotent (re-import same file produces no duplicate postingsGiven a BAI2 or NACHA lockbox file delivered by the bank
Control 2match scoring must evaluate invoice number, PO number, amount, and customer namewhen the system ingests the file
Control 3tolerance threshold must be configurable per entitythen it parses each remittance record, applies exact matches automatically, queues near-matches for clerk review, posts unapplied cash for unmatched items, and the import is idempotent (re-import produces zero duplicate postings
Control 4auto-applied payments must create GL entries identical to manual applicationnegative) when lockbox file is malformed or fails checksum then 422 INVALID_LOCKBOX_FILE with parse error detail is returned.
Control 5unmatched cash must not age as AR> 90% of lockbox payments applied without manual intervention; same-day cash application; AR aging is accurate by morning.
Control 6match audit trail must record rule that triggered match> 90% of lockbox payments applied without manual intervention; same-day cash application; AR aging is accurate by morning.

Audit evidence is a chain, not a folder.

Evidence layerWhat should be preserved
Business eventBank delivers a BAI2 or NACHA lockbox file at day-end; the system ingests the file, parses each remittance record, and runs auto-match logic against open invoices using invoice number, amount, and customer reference; exact matches are applied automatically and posted without human review; near-matches (amount differs < configured tolerance, or invoice number has leading zeros) are queued for clerk review; unmatched items are posted as unapplied cash against the customer account; daily auto-match rate is reported.
Control rulesLockbox file import must be idempotent (re-import same file produces no duplicate postings); match scoring must evaluate invoice number, PO number, amount, and customer name; tolerance threshold must be configurable per entity; auto-applied payments must create GL entries identical to manual application; unmatched cash must not age as AR; match audit trail must record rule that triggered match; non-functional: 10,000-line lockbox file must process in < 60 seconds.
Acceptance proofGiven a BAI2 or NACHA lockbox file delivered by the bank; when the system ingests the file; then it parses each remittance record, applies exact matches automatically, queues near-matches for clerk review, posts unapplied cash for unmatched items, and the import is idempotent (re-import produces zero duplicate postings); (negative) when lockbox file is malformed or fails checksum then 422 INVALID_LOCKBOX_FILE with parse error detail is returned.
Data record
lockbox_import { id: string, external_id: string, file_name: string, imported_at: timestamp, total_records: int, matched_count: int, queued_count: int, unmatched_count: int };
lockbox_record { import_id: string, remittance_ref: string, invoice_number: string, amount_minor: int64, currency_code: char(3), match_status: enum, match_rule: string, payment_id: pay_* };
(reference, product may differ).
System event
POST /v1/lockbox-imports { file_content_base64, file_type: enum(BAI2|NACHA), external_id } -> 202 { id, status: PROCESSING };
GET /v1/lockbox-imports/{id} -> 200 { matched_count, queued_count, unmatched_count, records[] };
emits ar.lockbox.processed;
idempotent via external_id.
Lifecycle state
PROCESSING -> COMPLETED;
terminal FAILED;
guard: duplicate import of same external_id returns existing record without reprocessing;
COMPLETED requires all records in a terminal match_status.

The useful version of this workflow is not only fast. It is inspectable. A controller, auditor, or operator should be able to move from source event to system record to state transition to final business outcome without guessing.

Implementation contracts.

Reference data model

`lockbox_import` { id: string, external_id: string, file_name: string, imported_at: timestamp, total_records: int, matched_count: int, queued_count: int, unmatched_count: int }; `lockbox_record` { import_id: string, remittance_ref: string, invoice_number: string, amount_minor: int64, currency_code: char(3), match_status: enum, match_rule: string, payment_id: pay_* }; (reference, product may differ).

API and events

`POST /v1/lockbox-imports` { file_content_base64, file_type: enum(BAI2|NACHA), external_id } -> 202 { id, status: PROCESSING }; `GET /v1/lockbox-imports/{id}` -> 200 { matched_count, queued_count, unmatched_count, records[] }; emits `ar.lockbox.processed`; idempotent via `external_id`.

State transitions

`PROCESSING -> COMPLETED`; terminal `FAILED`; guard: duplicate import of same external_id returns existing record without reprocessing; COMPLETED requires all records in a terminal match_status.

Common implementation traps.

Treating the workflow as data entry

If the ERP only stores the final record, the team loses the decision trail that explains how the record became valid.

Hiding exception logic

Exceptions need owners, reason codes, and time stamps. A vague pending state is not a control.

Posting without recovery design

Retries, duplicate submissions, and partial failures must be explicit so the system does not create inconsistent records.

Skipping evidence design

A workflow that cannot produce evidence on demand will eventually push finance teams back into manual screenshots and spreadsheets.

Where Rivane fits.

Rivane is built for finance workflows where automation must stay tied to source documents, approvals, state transitions, ledger impact, reporting, and audit evidence. Use this guide as a checklist for evaluating whether an ERP workflow is merely digitized or actually controlled.

References and source basis.

These sources provide the standards, regulatory, or government context around the flow. They are included so the guide is useful to finance operators, auditors, and implementation teams, not only buyers reading software copy.

Back to ERP use cases