Skip to main content
This guide is for developers. If you’re looking for a business-level overview of what Matcher does, see What is Matcher?.
This guide takes you from creating your first reconciliation context to reviewing matched transactions.

Before you begin


You need:
  • The Matcher API address that Lerian gives you
  • A valid JWT token for authentication
  • Two transaction files to reconcile (CSV, JSON, or XML)
All examples use cURL. Replace $TOKEN with your JWT token and https://api.matcher.example.com with the Matcher API address.

Step 1: Create a reconciliation context


A context defines the scope of your reconciliation: what you compare and how.
API reference: Create context
cURL
The type field defines how Matcher pairs transactions: Save the id from the response. You will use it in every subsequent step.
The context starts in DRAFT status. It moves to ACTIVE when you are ready to run reconciliation.

Step 2: Add data sources


To run a match, configure at least two sources: the systems whose transactions you want to compare.
API reference: Create source

Create a bank source

cURL

Create a ledger source

cURL
Save both source id values. Every source needs a side (LEFT or RIGHT): the context reconciles its LEFT sources against its RIGHT sources.

Source types

Step 3: Map source fields


Your source files probably use different column names than Matcher expects. Field maps translate them into Matcher’s standard schema.
API reference: Create field map

Map the bank source

cURL

Map the ledger source

cURL

Required fields

Every transaction must have these fields after mapping: Optional: description, fee_amount, fee_currency, and direction. Each mapping key is a Matcher field. Each value is the column name in your file, except for direction. Its value is an object {column, debit, credit} for a file that marks each row as debit or credit in a separate column. A debit row imports with a negative amount, and a credit row with a positive one.

Step 4: Create match rules


Rules define how Matcher compares transactions. Start with an exact rule, which is the most precise.
API reference: Create match rule

Create an exact rule

cURL

Add a tolerance rule as fallback

Catch small differences like bank fees or rounding:
cURL
Matcher evaluates rules by priority (lowest number first). The exact rule runs first. Only unmatched transactions fall through to the tolerance rule.

Rule types

Step 5: Activate the context


Move the context from DRAFT to ACTIVE:
API reference: Update context
cURL
If the context is not ready, Matcher refuses the update with 409 Conflict and code MTCH-0103. The errors array of the response lists each missing requirement. Setup progress lists the missing requirements and the next call to make.

Step 6: Upload transaction files


Upload one file per source. Matcher accepts CSV, JSON, and XML formats via multipart form upload.

Upload bank transactions

cURL

Upload ledger transactions

cURL
Each upload creates an ingestion job. Check the job status:
cURL
Wait for both jobs to reach COMPLETED status before running the match.

Step 7: Run matching


Start with a dry run to preview results without persisting:
API reference: Run match
cURL
The response includes a runId. A dry run saves no match groups. To review its results, read the aggregate statistics of the run with Get match run. When satisfied, run with COMMIT to persist matches:
cURL
Save the runId from the COMMIT response. You use it in Step 8.

Step 8: Review results


View match groups

cURL
Each match group contains paired transactions and a confidence score (0-100):

Undo an incorrect match

Use the unmatch endpoint to reject a PROPOSED match group or revoke a CONFIRMED one. Matcher returns the group’s transactions to the unmatched pool for the next run:
cURL

Step 9: Handle exceptions


Exceptions are transactions that Matcher could not match automatically. Matcher classifies each exception by severity:
API reference: List exceptions

List exceptions

cURL
Resolve exceptions directly, by force matching, or by creating adjustment entries.

Next steps


Contexts and sources

Full guide to context and source configuration.

Match rules

All rule types and config options in detail.

Confidence scoring

How Matcher calculates scores and what they mean.

Resolving exceptions

Handle unmatched transactions.