Event-Driven Architecture

Event contracts and asynchronous integration patterns derived from the current primitive documentation.

Source: docs/01_blueprint.md, docs/03_primitives.md

Platform goals

FinFactory’s platform architecture should support:

  • Reusable fintech primitives
  • Product-specific composition
  • Regulated financial workflows
  • Tenant-specific configuration
  • Clear service boundaries
  • Strong auditability
  • Deterministic ledger behavior
  • Event-driven integration
  • API-first product delivery
  • AI-assisted operations with strict controls

Primitive design rules

Each primitive should:

  • Own its domain
  • Own its database
  • Expose stable APIs
  • Publish domain events
  • Support idempotent commands
  • Maintain audit logs
  • Enforce authorization
  • Support tenant-level configuration where needed
  • Avoid direct database access from other services
  • Avoid leaking provider-specific details into product APIs

Typical Events by Primitive

Identity and KYC

customer.createdkyc.startedkyc.verifiedkyc.rejectedkyc.expiredrisk.flagged

EMI Wallet Issuing

wallet.createdwallet.activatedwallet.suspendedwallet.closedwallet.limit.updated

Ledger

journal.postedbalance.updatedhold.createdhold.releasedtransaction.reversed

QRPh Payments

qr.generatedqr.payment.receivedqr.payment.confirmedqr.payment.failed

Credit Card Payments

card.payment.authorizedcard.payment.capturedcard.payment.failedcard.payment.refunded

Card Issuing

card.issuedcard.activatedcard.suspendedcard.closedcard.authorization.approvedcard.authorization.declined

3D Secure

threedsecure.startedthreedsecure.challenge_requiredthreedsecure.authenticatedthreedsecure.failed

Fraud Detection

risk.approvedrisk.declinedrisk.review_requiredrisk.rule_triggered

Tokenization

token.createdtoken.updatedtoken.suspendedtoken.deleted

POS and SoftPOS

terminal.registeredterminal.assignedterminal.activatedterminal.disabledterminal.heartbeat.received

AI Financial Agent

ai.agent.query.receivedai.agent.action.proposedai.agent.action.approvedai.agent.action.executedai.agent.action.rejected