Wasup v3 Control Plane
Organizations, isolated workers, regional proxies, and fleet health.Sell WhatsApp instances, then provision only what was paid for.
The control plane uses Stripe as the billing source of truth, Supabase as the entitlement cache, Clerk for user and organization identity, and Azure workers for isolated WhatsApp runtime.
How The Flow Works
From payment to Azure worker desired state.
Clerk identifies the org, then Stripe Checkout sells instance seats and optional recurring message credits.
Stripe webhooks update Supabase billing_entitlements with subscription status, slot limit, period, and credits.
The API atomically reserves one available paid instance slot before creating a desired instance row.
Provisioner uses provider API or imported pool, then stores proxy secrets in Azure Key Vault.
Azure AKS or Container Apps worker owns the WhatsApp socket, pairing, webhook config, and runtime events.
Workers report sent/received/seen/webhook events with idempotency keys, and message credits are debited.
What I Need From You
These are the concrete inputs needed before real deployment.
Recommended Stripe Catalog
Simple pricing model that maps cleanly to entitlement checks.
Wasup WhatsApp Instance Seat: 1 recurring seat = 1 provisionable instanceWasup Message Credits: recurring pack, e.g. 1,000 credits per quantityMetadata: wasupEntitlement=instance | message_creditsRun: STRIPE_SECRET_KEY=... npm run stripe:productsAPI Surface
The endpoints currently implemented for billing, provisioning, and metering.
| Method | Path | Purpose |
|---|---|---|
| POST | /api/v3/billing/checkout | Creates a Stripe Checkout session for instance seats and optional message credits. |
| GET | /api/v3/billing/entitlements | Returns paid slots, active instances, billing status, and credit balance. |
| POST | /api/v3/provision/instances | Reserves one paid slot and creates desired worker state. Returns 402 if unpaid or full. |
| POST | /api/webhooks/stripe | Receives subscription events and syncs entitlement state from Stripe. |
| POST | /api/internal/usage-events | Workers report sent, received, seen, and webhook usage with idempotency keys. |
Proxy Decision
Best path depends on the provider.
Still To Build
The entitlement gate exists; these are the next production pieces.