Application-stream contract
ce-source:lender- Facts:
lerian.streaming.lender - Commands:
lerian.streaming.lender.commands - Route dead letters:
lerian.streaming.lender.dlq ce-type:studio.lerian.lender.<resource>.<event>- Dispatch key:
<resource>.<event>fromce-resourcetypeandce-eventtype
GET /api/v1/streaming/manifest.
Emitted events
The catalog declares 39 definitions. Lender emits 37 of them: 35 facts and 2 commands. The table separates catalog keys from the CloudEvent routing type.Emitted payload contracts
The contracts below mirror the CloudEventdata JSON tags in the published Lender contract. ? means the field can be absent. The Go wire structs declare no nullable pointer fields. unknown is raw JSON and may carry any JSON value, including null. Decimal values are JSON strings, timestamps are UTC RFC 3339 strings, and YYYYMM is a six-digit competência.
accounting_profile.configured
accounting_profile.configured
accounting_profile.configuredTopic: lerian.streaming.lenderSchema: 1.1.0Subject: profile_ideffective_from is the civil day the chart it describes starts governing. Without it, two events about one product version describe two different charts and nothing on the wire says which one governs a given month.assignment_set.approved / assignment_set.accepted
assignment_set.approved / assignment_set.accepted
assignment_set.approved, assignment_set.acceptedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: assignment_set_idA cession composition is durably approved. The event identifies the immutable approval that determines the offer file.risk_retention field names the retention regime the cession was booked under. The retained_fraction field is the share of the expected loss the institution keeps after the sale.collection.payment.*
collection.payment.*
collection.payment.applied, collection.payment.unapplied, collection.payment.reapplied, collection.payment.refundedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: application_idloan_application.submitted
loan_application.submitted
loan_application.submittedTopic: lerian.streaming.lenderSchema: 2.0.0Subject: loan_application_idloan_application.approved
loan_application.approved
loan_application.approvedTopic: lerian.streaming.lenderSchema: 2.0.0Subject: loan_application_idloan_application.rejected
loan_application.rejected
loan_application.rejectedTopic: lerian.streaming.lenderSchema: 2.0.0Subject: loan_application_idloan_application.withdrawn
loan_application.withdrawn
loan_application.withdrawnTopic: lerian.streaming.lenderSchema: 2.0.0Subject: loan_application_idloan_application.disbursed
loan_application.disbursed
loan_application.disbursedTopic: lerian.streaming.lenderSchema: 2.0.0Subject: loan_application_idloan_charge.applied
loan_charge.applied
loan_charge.appliedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: loan_account_idloan_product.created
loan_product.created
loan_product.createdTopic: lerian.streaming.lenderSchema: 1.0.0Subject: loan_product_idloan_product.activated
loan_product.activated
loan_product.activatedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: loan_product_idloan_product.current_version_promoted
loan_product.current_version_promoted
loan_product.current_version_promotedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: loan_product_idThe product is the aggregate after the repoint, so current_version_id is the new pin. Contracts already written keep the version they were born on. Only new applications originate on the promoted one. The promoted_by field holds the authenticated subject verbatim. It is empty when no human asked for the promotion.loan_product_version.created
loan_product_version.created
loan_product_version.createdTopic: lerian.streaming.lenderSchema: 1.0.0Subject: loan_product_version_idadmitted_borrower_kinds field is always present. An empty array means the version admits no borrower.loan_schedule.prepayment_applied
loan_schedule.prepayment_applied
loan_schedule.prepayment_appliedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: schedule_version_idloan_schedule.rescheduled
loan_schedule.rescheduled
loan_schedule.rescheduledTopic: lerian.streaming.lenderSchema: 1.0.0Subject: schedule_version_idrepayment.recorded
repayment.recorded
repayment.recordedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: transaction_idreturned_payment_receivable.opened / returned_payment_receivable.collected / returned_payment_receivable.written_off
returned_payment_receivable.opened / returned_payment_receivable.collected / returned_payment_receivable.written_off
returned_payment_receivable.opened, returned_payment_receivable.collected, returned_payment_receivable.written_offTopic: lerian.streaming.lenderSchema: 1.0.0Subject: receivable_idThe three facts project the same aggregate through one shared projection, so two facts about one debt cannot describe it differently. Every field is always present. A field that does not apply yet holds an empty string. It is never absent and never null. Read status to tell the states apart, not the emptiness of a field.The stage and provision_amount fields carry the aging of the debt. The provision_consumed and loss fields split the write-off. The reversal_transaction_id field is unique per receivable and is the anchor that a redelivery of the same reversal resolves to.repayment_reversal.recorded
repayment_reversal.recorded
repayment_reversal.recordedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: transaction_idloan_account.pdd_stage_transitioned
loan_account.pdd_stage_transitioned
loan_account.pdd_stage_transitionedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: loan_account_idprepayment_quote.created
prepayment_quote.created
prepayment_quote.createdTopic: lerian.streaming.lenderSchema: 1.0.0Subject: quote_idprepayment_settlement.recorded
prepayment_settlement.recorded
prepayment_settlement.recordedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: settlement_idloan_account.debt_balance_changed
loan_account.debt_balance_changed
loan_account.debt_balance_changedTopic: lerian.streaming.lenderSchema: 2.0.0Subject: loan_account_idloan_account.payment_overdue
loan_account.payment_overdue
loan_account.payment_overdueTopic: lerian.streaming.lenderSchema: 1.0.0Subject: loan_account_idloan_account.problem_asset_assessed
loan_account.problem_asset_assessed
loan_account.problem_asset_assessedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: loan_account_idLender emits it on both verdicts. A declaration with characterizes_problem_asset set to false is the only way to withdraw an earlier characterization.loan_account.problem_asset_reassessment_overdue
loan_account.problem_asset_reassessment_overdue
loan_account.problem_asset_reassessment_overdueTopic: lerian.streaming.lenderSchema: 1.0.0Subject: loan_account_idThis fact is a call to review. It changes nothing on the contract: the stage, the provision, and the income-recognition decision stay as they were. Lender emits it once per contract per business date, and a declaration of either verdict ends it.consignado.exclusao.requested
consignado.exclusao.requested
consignado.exclusao.requestedTopic: lerian.streaming.lender.commandsSchema: 1.0.0Subject: request_refconsignado.redirecionamento.requested
consignado.redirecionamento.requested
consignado.redirecionamento.requestedTopic: lerian.streaming.lender.commandsSchema: 1.0.0Subject: request_refpayroll_deduction.refund_required
payroll_deduction.refund_required
payroll_deduction.refund_requiredTopic: lerian.streaming.lenderSchema: 1.0.0Subject: receipt_idpayroll_overdeduction.refund_required
payroll_overdeduction.refund_required
payroll_overdeduction.refund_requiredTopic: lerian.streaming.lenderSchema: 1.0.0Subject: refund_case_idcollection.instruction.issued
collection.instruction.issued
collection.instruction.issuedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: instrument_idguarantee_recovery.cash_allocated
guarantee_recovery.cash_allocated
guarantee_recovery.cash_allocatedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: receipt_idCataloged but not emitted
These two definitions are present in the manifest but have no non-test Lender emission caller. Do not treat theirlender-sourced forms as operational integrations.
Events consumed
Lender wires 15 gateway fact keys fromlerian.streaming.consignado-gw and one Matcher fact from lerian.streaming.matcher. Each consumer is configuration-gated and registered in bootstrap.
consignado.proposal.accepted. That key is not a Lender booking input.
Internal event planes
Lender also writes internal outbox event types for ledger intents, collection work, and signed hub handoffs. They are process-local coordination contracts, not entries of the event catalog. This public inventory omits them on purpose.Delivery and compatibility rules
- Deduplicate by
(ce-source, ce-id)and make handlers idempotent. - Read
ce-schemaversionbefore decoding. The version is a CloudEvents header, never a topic suffix. - Money and rates are decimal strings. Timestamps are UTC RFC 3339.
- The wired fact consumers filter exact keys. They skip and commit unmatched facts on the shared application topics. Malformed handled records follow the consumer DLQ policy.
- A missing required business identifier prevents emission or command execution. Lender never synthesizes it.

