B2B2C Platform Development
B2B2C is a model where a business (B) uses another business's (B) platform to work with end consumers (C). Classic examples: marketplaces (platform ↔ sellers ↔ buyers), insurance aggregators (platform ↔ insurance companies ↔ clients), educational platforms (platform ↔ teachers ↔ students).
Three-level architecture
Platform (operator)
↓ provides infrastructure
Business partners (B2B clients, vendors, service providers)
↓ serve through platform
End consumers (B2C users)
Each level has its own interface and access rules:
- Operator — superadmin, sees everything, manages partners
- Partner — sees only their own clients and analytics
- Consumer — sees only their own content and services
White-label for partners
Partners often want the platform to look like their own product. White-label solution:
- Custom domain (
partner.yourdomain.comoryourdomain.partnerdomain.com) - Logo and color scheme
- Custom email notification templates
- Optionally — fully custom CSS via CSS variables
Implementation: middleware determines tenant by domain, loads settings from database, applies theme.
Settlement calculations
In a B2B2C platform, three parties participate in a transaction:
- Consumer pays X
- Partner receives X − platform commission
- Platform receives commission
Additionally: referral programs, partner discounts, end-customer discounts via partner promo codes.
Partner data independence
Data from different partners must not be mixed. Isolation strategies:
Row-level multi-tenancy: organization_id field in all tables, Row-Level Security at PostgreSQL level. Cheap, scales well to thousands of partners.
Schema per tenant: each partner — own PostgreSQL schema. Better isolation, but migration complexity.
Separate databases: maximum isolation, recommended for enterprise partners with data security requirements.
Analytics by level
- Operator sees: total revenue, partner activity, cohort analysis, churn
- Partner sees: their consumers, activity, income, conversions
- Consumer sees: their orders, history, recommendations
Partner analytics should be isolated — they shouldn't see other partners' aggregated data even in comparative metrics (by default).
Partner onboarding
The easier it is to register and launch, the higher the conversion to active partners. Typical process:
- Company registration + documents
- Setup wizard (branding, settings, first product/service)
- Test mode (sandbox payments, integration checks)
- Publication (switch to production)
Time from registration to first transaction should be no more than 1–2 days.
Technical stack
| Component | Technologies |
|---|---|
| Tenant isolation | PostgreSQL RLS + schema per tenant |
| White-label | Subdomains + CSS custom properties |
| Auth | OAuth2 (different clients for partner and consumer) |
| Payments | Stripe Connect / payment gateway agent scheme |
| Analytics | ClickHouse or PostgreSQL + Metabase |
Timeline
MVP B2B2C platform with partner management, white-label, data isolation and basic financials: 4–6 months. Full-featured platform with marketplace of services, mobile applications and multi-level analytics: 8–14 months.







