Provider Philosophy
The rule
Frontends never call providers directly. All provider interactions are routed through app-api and the provider adapter layer.
See Provider Adapter Layer for the technical architecture.
Provider categories
| Category | Providers |
|---|---|
| Insurance | Quick Sigorta, Hepiyi Sigorta, Sompo, Türk Nippon, Doğa, EMAA, Arex, Ankara Sigorta |
| Messaging | WhatsApp Cloud API (Meta), SendGrid, Twilio |
| Payments | Stripe, Wise |
| Government | Immigration (e-Government), Land Registry, Ministry of Labour |
| Security | FingerprintJS, Cloudflare WAF, Cloudflare Turnstile, Stripe Radar |
| AI | OpenAI, Claude (Anthropic) |
Provider selection philosophy
Insurance
Ikamet is a broker, not an insurer. This means:
- We access multiple insurers for each product type
- The customer gets the best available quote, not a single provider’s offer
- We are not tied to any single insurer’s technology or pricing
- Commission structure varies by provider — this is tracked separately from the operational system
Messaging
WhatsApp is the primary channel. Email and SMS are secondary. Selection criteria:
- WhatsApp — primary for all customer communications; highest open rates
- Email — policy documents, formal confirmations, documents that need a paper trail
- SMS — OTP / verification only via Twilio Verify; fallback for non-WhatsApp users
Payments
- Stripe — primary payment processor; used for card payments, subscriptions, invoicing
- Wise — international transfers; used for cross-border payments from non-Turkish accounts
Provider failure handling
Providers go down. The adapter layer must:
- Return clear errors to the API (not bubble up raw provider errors to the frontend)
- Log all provider failures to the timeline where relevant
- Support retry logic for transient failures
- Support fallback to alternative providers where possible (e.g., if one insurer API is down, try next)
Adding a new provider
- Create an adapter module in
app-api/src/adapters/{category}/{provider-name}.adapter.ts - Implement the category interface (e.g.,
InsuranceProviderAdapter) - Add the provider to the category’s
index.ts(unified interface) - Add credentials to environment variables — never hardcode
- Document the provider’s quirks in
/providers/{category}in this docs site - Test in staging before enabling in production