What you get
Lender
The credit journey engine. It owns loan products, origination, servicing, posting rules and accrual runs, and the audit trail, for consumer credit (CDC). The ledger stays the source of truth for balances.
Consignado CLT (Dataprev)
The native rail to Dataprev’s Crédito do Trabalhador program for private-sector payroll loans.
Midaz
The source of truth for balances. It receives each disbursement and each interest accrual as a balanced double-entry transaction.
Access Manager
Issues the machine-to-machine credentials and the short-lived JWT that the ledger relay carries, per tenant.
Matcher
Turns a reconciliation verdict into a servicing action. Lender consumes the completed match run.
Streaming Hub
Delivers Lender and Consignado facts to a webhook, a cloud queue, or a cursor you pull.
How the pieces fit together
- Your channel calls Lender over HTTP. Loan products, applications, loan accounts, accrual runs, and the Brazilian regulatory records all sit under
/api/v1. There is no client library to install. - For a payroll loan, Lender emits a command on its command topic. The rail reads that command and calls Dataprev with the tenant’s requester code, OAuth credentials, and ICP-Brasil certificate.
- The rail publishes business facts back onto its own topic. Lender consumes those facts and moves the loan application through its stages.
- A disbursement or an interest accrual writes a durable posting intent. The intent lands in the same database transaction that changes the domain state.
- The ledger relay posts the balanced double-entry transaction to Midaz through the official SDK. Each posting carries a deterministic idempotency key, so a retried post collapses to one Midaz transaction.
- The relay reaches Midaz through Access Manager. It authenticates with machine-to-machine credentials and a short-lived JWT, per tenant.
- Lender publishes its own facts on its own event topic. Streaming Hub follows that topic and delivers each matched event to a destination you own.
What each piece owns
Adopt it one piece at a time
1
Run a first loan with Lender alone
PostgreSQL and Valkey are the services origination needs. Production also requires an identity provider for route authorization. A first loan needs no Midaz and no RedPanda. The posting intent stays durable in the outbox until you configure a ledger.
2
Configure the ledger relay
Point Lender at Midaz and at Access Manager. Lender then posts each disbursement and each accrual as a balanced transaction. Before the relay posts, Lender makes sure each account alias in the accounting profile exists. It skips external accounts, and it never creates assets.
3
Add the Consignado CLT (Dataprev) rail
Private-sector payroll loans reach Dataprev’s Crédito do Trabalhador program through the native rail. Register the tenant’s ICP-Brasil certificate, OAuth credentials, and three-digit requester code before the first call.
4
Close the loop on the facts
Turn on streaming and subscribe to Lender facts in Streaming Hub. When you reconcile with Matcher, first agree the event contract on both sides. Then turn on the Matcher listener in Lender.
Bring your own
- Your channels. The REST API is the whole client surface, so you call Lender from the stack you already run.
- Your secrets custody. The relay reads its machine-to-machine credentials from AWS Secrets Manager, or from HashiCorp Vault KV v2 when you select it.
- Your identity protocols. Access Manager’s identity provider supports OAuth 2.0 and OIDC, SAML 2.0, SCIM 2.0 provisioning, and LDAP against an external directory.
- Your event consumers. A Streaming Hub subscription delivers to a webhook, a pull cursor, Amazon SQS, RabbitMQ, or Amazon EventBridge.
- Your reconciliation sources, through Matcher. See Reconciliation.
A worked example
This example follows a private-sector payroll loan from the first call to the ledger entry.
- Your channel creates the loan application in Lender against a loan product version.
- Lender emits the margin request command. The rail performs the worker margin read against Dataprev and returns the rail response, without turning it into an underwriting decision.
- You price the loan and approve it under your own credit policy. Lender records the contracted rate, the CET, the IOF, and the installment plan as facts, and binds them to the product version.
- Brazilian origination adds regulated steps. Lender records the CET disclosure. It also records the capitalization consent, with the clause text and the hash it recomputes.
- The rail registers the contract with Dataprev, attaches the CCB document, and publishes the booking and payment facts. Lender consumes the contract registration and the disbursement confirmation.
- Lender commits the disbursement event, the origination schedule, and the posting intent in one database transaction. The relay posts the balanced transaction to Midaz shortly after the response.
- Each accrual run posts the same way, on the same idempotency guarantee. If you reconcile, a completed match run moves the servicing stage and creates the matching posting intent.
Start here
What is Lender?
The five domains of the credit journey, and what each one owns.
Lender quick start
Six calls from an empty database to a disbursed loan.
Consignado CLT (Dataprev)
What the payroll rail covers, and where its responsibility ends.

