API Standards

Current documentation statements relevant to API stability, versioning, idempotency, and product-facing abstraction.

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

Unified Product API

The Unified Product API is the external-facing API layer exposed to a client product.

Its purpose is to hide primitive complexity and present a clean product-specific API.

For example, a stored-value wallet product should expose concepts such as:

  • Customers
  • Wallets
  • Balances
  • Cash-ins
  • Cash-outs
  • QR payments
  • Transfers
  • Transactions
  • Statements

The client should not need to know whether a request touches the KYC service, wallet issuing service, ledger service, QRPh service, or fraud service.

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

Architectural principle

FinFactory should optimize for product composability without sacrificing financial correctness.

This means:

  • Products are flexible
  • Primitive boundaries are strict
  • Ledger behavior is deterministic
  • Money movement is auditable
  • External integrations are isolated
  • AI actions are controlled
  • Configuration is tenant-aware
  • APIs are stable and versioned