Domain Events
Lana Bank publishes domain events via the transactional outbox pattern. These events can be consumed by external systems for integration, analytics, and audit purposes.
All events are serialized as JSON and include metadata for tracing and ordering.
Event Structure
Each event is wrapped in an envelope with the following structure:
{
"id": "uuid",
"event_type": "core.credit.facility-activated",
"payload": { ... },
"recorded_at": "2024-01-15T10:30:00Z",
"trace_id": "trace-uuid"
}
Access Events
Events related to user and role management.
| Event | Description | Payload Fields |
|---|---|---|
UserCreated | A new user was created | - |
RoleCreated | A new role was created | - |
Credit Events
Events related to credit facility lifecycle and operations.
| Event | Description | Payload Fields |
|---|---|---|
FacilityProposalCreated | A credit facility proposal was created | - |
FacilityProposalConcluded | A credit facility proposal was concluded | - |
PendingCreditFacilityCollateralizationChanged | Collateralization state changed for pending facility | - |
PendingCreditFacilityCompleted | A pending credit facility was completed | - |
FacilityActivated | A credit facility was activated | - |
FacilityCompleted | A credit facility was fully repaid and closed | - |
FacilityCollateralizationChanged | Collateralization state changed for active facility | - |
DisbursalInitialized | A disbursal was initiated and is pending approval | - |
DisbursalApprovalConcluded | A disbursal approval process was concluded | - |
DisbursalSettled | A disbursal was settled | - |
DisbursalCancelled | A disbursal was cancelled | - |
AccrualPosted | Interest accrual was posted | - |
FacilityMatured | No description available | - |
PartialLiquidationInitiated | A partial liquidation was initiated | - |
CreditCollateral Events
Events related to credit facility collateral management and liquidation.
| Event | Description | Payload Fields |
|---|---|---|
CollateralUpdated | Collateral amount was updated | - |
LiquidationCollateralSentOut | Collateral was sent for liquidation | - |
LiquidationProceedsReceived | No description available | - |
LiquidationCompleted | No description available | - |
CreditCollection Events
Events related to credit facility obligations and payment collection.
| Event | Description | Payload Fields |
|---|---|---|
PaymentCreated | A payment was created | - |
PaymentAllocationCreated | A payment allocation was created | - |
ObligationCreated | A new obligation was created | - |
ObligationDue | An obligation became due | - |
ObligationOverdue | An obligation became overdue | - |
ObligationDefaulted | An obligation defaulted | - |
ObligationCompleted | An obligation was fully paid | - |
Custody Events
Events related to Bitcoin custody and wallet management.
| Event | Description | Payload Fields |
|---|---|---|
WalletBalanceUpdated | No description available | - |
Customer Events
Events related to customer lifecycle and KYC.
| Event | Description | Payload Fields |
|---|---|---|
CustomerCreated | A new customer was created | - |
CustomerFrozen | A customer account was frozen, blocking financial operations | - |
CustomerUnfrozen | A previously frozen customer account was unfrozen, restoring normal operations | - |
CustomerClosed | Customer account was closed | - |
CustomerPiiErasureScheduled | PII erasure was scheduled for a closed customer's party | - |
CustomerPiiErasureCancelled | A scheduled PII erasure for a customer's party was cancelled before execution | - |
ProspectCreated | A new prospect was created for onboarding | - |
ProspectConverted | A prospect was converted to a customer | - |
ProspectClosed | A prospect was closed without converting | - |
ProspectPiiErasureScheduled | PII erasure was scheduled for a closed prospect's party | - |
ProspectPiiErasureCancelled | A scheduled PII erasure for a prospect's party was cancelled before execution | - |
Deposit Events
Events related to deposit accounts and transactions.
| Event | Description | Payload Fields |
|---|---|---|
DepositAccountProductCreated | A deposit account product was created for one customer type with its currency and accounting topology | - |
DepositAccountCreated | A deposit account was created | - |
DepositAccountFrozen | No description available | - |
DepositAccountUnfrozen | No description available | - |
DepositAccountClosed | No description available | - |
DepositAccountActivityUpdated | No description available | - |
DepositInitialized | No description available | - |
DepositReverted | A deposit was reverted | - |
WithdrawalInitialized | A withdrawal was initiated and is pending approval | - |
WithdrawalApprovalConcluded | A withdrawal approval process was concluded | - |
WithdrawalDenied | A withdrawal was denied | - |
WithdrawalConfirmed | A withdrawal was confirmed | - |
WithdrawalCancelled | A withdrawal was cancelled | - |
WithdrawalReverted | A confirmed withdrawal was reverted | - |
Price Events
Official rate events published at end of day and on the hour tick; runtime price updates are ephemeral and never persisted.
| Event | Description | Payload Fields |
|---|---|---|
ClosingRateCaptured | Official closing rate for one currency pair on one business day, published by the capture-closing-rates EOD phase. Runtime prices are ephemeral. | - |
RateSnapshotCaptured | The runtime's latest sanitized rate for one currency pair, republished as a persistent event on each hour tick. No provider fetch happens at the tick: the rate, sanitization window, and provenance come from the record the realtime aggregation pipeline already produced, so hourly-refreshed reports convert at exactly the rate the bank was using. | - |
Governance Events
Events related to approval workflows.
| Event | Description | Payload Fields |
|---|---|---|
ApprovalProcessConcluded | An approval process was concluded | - |
Time Events
Events related to end-of-day processing.
| Event | Description | Payload Fields |
|---|---|---|
EndOfDay | The operational clock rolled past the closing time for the configured timezone; the raw day-boundary signal that day-scoped reactions and the EOD close process key off | - |
HourTick | The operational clock crossed into a new hour; the hourly intraday signal that periodic (non-EOD) reactions key off. Published at most once per hour boundary, with missed boundaries coalesced into one tick | - |
Event Types Reference
All event types follow the naming convention: core.<module>.<event-name>
| Module | Event Type Prefix |
|---|---|
| Access | core.access.* |
| Credit | core.credit.* |
| CreditCollateral | core.credit-collateral.* |
| CreditCollection | core.credit-collection.* |
| Custody | core.custody.* |
| Customer | core.customer.* |
| Deposit | core.deposit.* |
| Price | core.price.* |
| Report | core.report.* |
| Governance | governance.* |
| Time | core.time.* |
Consuming Events
Events are published via the transactional outbox and can be consumed through:
- Direct database polling - Query the outbox table
- Event streaming - Integration with message queues (implementation dependent)
- Reporting warehouse - Via the outbox relay into Postgres DW
For integration details, contact the platform team.