Quickstart

How it works

A mental model of the platform — layered, canonical, and standards-aligned. The same architecture powers connectivity for distribution, claims, verification, and the Records API.

Five-layer model#

Inbound requests flow top-down; events and notifications flow bottom-up. Each layer hides the next from your code.

LayerNameResponsibility
L1Partner channelAccepts API requests from your application.
L2API gateway & securityAuthentication, rate limiting, tenant resolution, validation.
L3Core orchestrationBusiness logic: enrollment, policy, pricing, claims, ledger.
L4HMO connectorsOne adapter per HMO vendor — normalises every difference.
L5IntelligenceAI normalisation, fraud scoring, plan ranking, pricing.

Request lifecycle#

A typical enrollment touches every layer. From your POST to the policy being live in the HMO's system, the journey is:

  1. Gateway validates auth, schema, idempotency key.
  2. Identity service verifies BVN/NIN.
  3. Duplicate detection checks for existing policies.
  4. Policy engine applies plan rules and waiting periods.
  5. Premium router initiates the first collection.
  6. HMO connector posts the enrollment to the HMO's system.
  7. Pierflow stores the canonical policy record.
  8. Commission engine posts the ledger entry.
  9. Webhooks fire to your endpoint.
You only need to think about steps 1 and 9 — the gateway and the events. Everything between is handled for you.