Skip to content

Guide · Nexus

Bank reconciliation via API

Bank reconciliation is comparing what the bank recorded with what the ERP expects, record by record, to say what matches, what differs and what is missing. Through an API, that comparison stops being a monthly spreadsheet and runs on every piece of data that arrives.

What you need: two sources and a rule.

Every reconciliation has two sides. In Nexus, each side is a dataset with a typed schema, and the rule that compares them is a ruleset. To reconcile bank and ERP:

Bank statement
The transactions read through Openi's Open Finance API, or the statement exported as CSV or NDJSON.
ERP
The ERP's entries, sent as JSON (up to 20,000 records per call) or as a CSV or NDJSON file.

Step by step, in four calls.

  1. 1Send the records

    Create one dataset per side and send the records to POST /v1/datasets/{id}/ingestions. Ingestion is asynchronous and atomic.

  2. 2Create the ruleset

    Describe how the sides relate: blocking by document, weighted matchers for document, amount and date, and the thresholds.

  3. 3Run the job

    POST /v1/jobs checks the ruleset against both datasets and queues the job. A trigger does it on its own on every new load.

  4. 4Read the matches

    Every match carries its status, score and a breakdown per rule, through the API or by webhook.

curl -X POST "https://nexus-v2.openi.com.br/v1/datasets/$NOTAS_ID/ingestions" \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: notas-2026-10-08" \
  -d '{"records": [
    {"numero_nf": "NF-1", "doc_tomador": "12.345.678/0001-90",
     "valor": "100.50", "vencimento": "2026-09-30"}
  ]}'

# 202: the ingestion is queued.
# Larger volumes go as a CSV or NDJSON file.

How to read the result.

Every pair compared gets a score, and the ruleset's thresholds decide the result. Matches come through the API and by webhook signed with the Standard Webhooks scheme, in the events matches.created and matches.possible.

matched
The score passed the match threshold. The records are reconciled and need no review.
possible
The score passed the review threshold but not the match one, or another candidate was too close. You confirm or reject it through the API.
no match
Below the thresholds, the pair is discarded. The record stays open and goes into the next job.

Not every payment is one to one. Nexus also reconciles by sum, 1:N, N:1 and N:M, with partials and installments: one deposit that settles several invoices, or one invoice paid in more than one transfer.

In production: NDD.

NDD uses Nexus to reconcile more than 100 million records. Records come in by file or through the API, the ruleset matches the two sides and each match comes back with a status and a score, with no manual queue for what checks out.

See also the Nexus page and the API reference.

Product of interest

By sending, you agree to the Privacy Policy (in Portuguese).