
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.
- Multi-Tenant
- Organization-level architecture built for clinics and medical teams
- Real-Time Metering
- Seat and AI usage tracked live across every tenant
- Zero Manual Billing
- Invoicing and seat provisioning run automatically
- 100% Idempotent
- Every Stripe event processed exactly once, audit-ready
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.”
Our Take
Scaling from one user to an organization is an infrastructure problem, not a feature.
Turning a single-user tool into something clinics and medical teams could buy seats in wasn't a UI change — it meant rebuilding how the system tracked usage, billed, and proved its own integrity under audit. Get that foundation wrong and every feature built on top inherits the same fragility. Get it right, and the business can grow without the infrastructure becoming the bottleneck.
If part of this sounds familiar, here's where that conversation starts.

