Skip to main content
Version: 0.62.0-rc.1267

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.

EventDescriptionPayload Fields
UserCreatedA new user was created-
RoleCreatedA new role was created-

Credit Events​

Events related to credit facility lifecycle and operations.

EventDescriptionPayload Fields
FacilityProposalCreatedA credit facility proposal was created-
FacilityProposalConcludedA credit facility proposal was concluded-
PendingCreditFacilityCollateralizationChangedCollateralization state changed for pending facility-
PendingCreditFacilityCompletedA pending credit facility was completed-
FacilityActivatedA credit facility was activated-
FacilityCompletedA credit facility was fully repaid and closed-
FacilityCollateralizationChangedCollateralization state changed for active facility-
DisbursalInitializedA disbursal was initiated and is pending approval-
DisbursalApprovalConcludedA disbursal approval process was concluded-
DisbursalSettledA disbursal was settled-
DisbursalCancelledA disbursal was cancelled-
AccrualPostedInterest accrual was posted-
FacilityMaturedNo description available-
PartialLiquidationInitiatedA partial liquidation was initiated-

CreditCollateral Events​

Events related to credit facility collateral management and liquidation.

EventDescriptionPayload Fields
CollateralUpdatedCollateral amount was updated-
LiquidationCollateralSentOutCollateral was sent for liquidation-
LiquidationProceedsReceivedNo description available-
LiquidationCompletedNo description available-

CreditCollection Events​

Events related to credit facility obligations and payment collection.

EventDescriptionPayload Fields
PaymentCreatedA payment was created-
PaymentAllocationCreatedA payment allocation was created-
ObligationCreatedA new obligation was created-
ObligationDueAn obligation became due-
ObligationOverdueAn obligation became overdue-
ObligationDefaultedAn obligation defaulted-
ObligationCompletedAn obligation was fully paid-

Custody Events​

Events related to Bitcoin custody and wallet management.

EventDescriptionPayload Fields
WalletBalanceUpdatedNo description available-

Customer Events​

Events related to customer lifecycle and KYC.

EventDescriptionPayload Fields
CustomerCreatedA new customer was created-
CustomerFrozenA customer account was frozen, blocking financial operations-
CustomerUnfrozenA previously frozen customer account was unfrozen, restoring normal operations-
CustomerClosedCustomer account was closed-
CustomerPiiErasureScheduledPII erasure was scheduled for a closed customer's party-
CustomerPiiErasureCancelledA scheduled PII erasure for a customer's party was cancelled before execution-
ProspectCreatedA new prospect was created for onboarding-
ProspectConvertedA prospect was converted to a customer-
ProspectClosedA prospect was closed without converting-
ProspectPiiErasureScheduledPII erasure was scheduled for a closed prospect's party-
ProspectPiiErasureCancelledA scheduled PII erasure for a prospect's party was cancelled before execution-

Deposit Events​

Events related to deposit accounts and transactions.

EventDescriptionPayload Fields
DepositAccountProductCreatedA deposit account product was created for one customer type with its currency and accounting topology-
DepositAccountCreatedA deposit account was created-
DepositAccountFrozenNo description available-
DepositAccountUnfrozenNo description available-
DepositAccountClosedNo description available-
DepositAccountActivityUpdatedNo description available-
DepositInitializedNo description available-
DepositRevertedA deposit was reverted-
WithdrawalInitializedA withdrawal was initiated and is pending approval-
WithdrawalApprovalConcludedA withdrawal approval process was concluded-
WithdrawalDeniedA withdrawal was denied-
WithdrawalConfirmedA withdrawal was confirmed-
WithdrawalCancelledA withdrawal was cancelled-
WithdrawalRevertedA 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.

EventDescriptionPayload Fields
ClosingRateCapturedOfficial closing rate for one currency pair on one business day, published by the capture-closing-rates EOD phase. Runtime prices are ephemeral.-
RateSnapshotCapturedThe 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.

EventDescriptionPayload Fields
ApprovalProcessConcludedAn approval process was concluded-

Time Events​

Events related to end-of-day processing.

EventDescriptionPayload Fields
EndOfDayThe 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-
HourTickThe 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>

ModuleEvent Type Prefix
Accesscore.access.*
Creditcore.credit.*
CreditCollateralcore.credit-collateral.*
CreditCollectioncore.credit-collection.*
Custodycore.custody.*
Customercore.customer.*
Depositcore.deposit.*
Pricecore.price.*
Reportcore.report.*
Governancegovernance.*
Timecore.time.*

Consuming Events​

Events are published via the transactional outbox and can be consumed through:

  1. Direct database polling - Query the outbox table
  2. Event streaming - Integration with message queues (implementation dependent)
  3. Reporting warehouse - Via the outbox relay into Postgres DW

For integration details, contact the platform team.