
An AI platform for healthcare professionals moving from a single-user tool to a multi-tenant product. We architected the B2B billing and organization layer: seat management, real-time usage tracking, subscription lifecycles, and a resilient Stripe event pipeline with idempotent webhooks and granular auditing.
- Client
- Remexis
- Industry
- Healthcare / SaaS
- Focus
- Seat-Based Metering
The Opportunity
Remexis is an AI-powered platform providing evidence-based natural medicine guidance for healthcare professionals. To support its evolution into an enterprise-grade solution, we architected and implemented a comprehensive B2B billing and organization management subsystem. This infrastructure lets clinics and medical teams manage seats, track real-time AI usage, and handle complex subscription lifecycles — taking Remexis from a single-user tool to a multi-tenant platform ready for global healthcare teams.
The Challenge
- Transitioning to a multi-tenant B2B organization structure
- Implementing precise seat-based provisioning and billing
- Real-time tracking of AI query usage and limits
- A resilient, audit-ready billing ecosystem for compliance
The Solution
A billing architecture built on Next.js, Stripe, and Prisma, focused on high availability and synchronization at the organization level — with a custom webhook listener, advanced idempotency, granular usage tracking, and an admin auditing dashboard.
- Custom B2B billing subsystem with Stripe seat-based pricing
- Resilient webhook pipeline with cryptographic verification and idempotency
- Granular usage tracking for real-time AI query monitoring and metering
- Centralized organization management for tenant-level administration
- Automated fail-safe processing with custom grace periods for failed payments
- Audit ecosystem tracking full subscription and event histories
The Results
What the build produced, and what it changed for the business.
- Scalable
- Multi-tenant architecture built for organizations
- Real-time
- Usage and seat metering across every tenant
- Automated
- Invoicing and seat provisioning
- 100%
- Idempotent event handling on the Stripe pipeline
About Remexis
Remexis is an AI-powered clinical platform delivering evidence-based natural medicine guidance to healthcare professionals. Its users are clinics and medical teams who need reliable answers at the point of care, which meant the platform had to graduate from a single-user tool into a multi-tenant product organizations could buy seats in.
- Industry
- Healthcare / SaaS
- Deliverables
- B2B billing systemOrganization managementUsage analytics
- Technologies
- Next.jsStripePrismaPostgreSQLReact Query
“Cristoval is an exceptional developer who truly excels under the pressure of a live production launch. He successfully navigated complex system integrations, ensuring every part of the application was rock solid before handover. What sets him apart is his commitment to security and a clean transition; he verified every audit log and setting to ensure I had full ownership as the client.”

