WITHMIA v1.0.8 — Real Plan Enforcement + Free Web Chat
Full backend enforcement for every plan limit (documents, workflows, members, channels). The Free plan now includes WhatsApp + Web Chat — two channels to get started without paying.
WITHMIA Team
WITHMIA
Note (July 2026): the Business and Enterprise plans are now called Team and Max. Prices are unchanged.
v1.0.7 left billing running without errors. v1.0.8 closes a critical gap: every plan’s limits are now genuinely enforced in the backend, and the Free plan gets more competitive with WhatsApp + Web Chat included.
The problem: enforcement that didn’t exist
A deep audit revealed that plan limits were only being checked in the frontend — visual locks, “PRO” badges and redirects to the subscription page. But the APIs were wide open:
- A Free plan user could upload documents to the knowledge base via the API
- They could create unlimited workflows by calling the endpoint directly
- They could invite members with no restriction whatsoever
- Only AI messages (500/month) had real enforcement, via
AiUsageService
What did that mean?
That anyone with a bit of technical know-how could bypass every Free plan restriction and use paid features without subscribing. A security problem and a business model problem at once.
The fix: PlanEnforcementService
We reviewed and completed the PlanEnforcementService, which centralises all the limit-checking logic:
| Method | What it checks | Data source |
|---|---|---|
canUseChannel($company, $channel) | Channel allowed on the plan | billing.plans.{tier}.channels |
canAddDocument($company) | RAG document limit | max_documents vs KnowledgeDocument::count() |
canCreateWorkflow($company) | n8n workflow limit | max_workflows vs WhatsAppInstance::count() |
canAddMember($company) | Member limit | max_members vs User::count() + TeamInvitation::pending() |
The service automatically resolves the company’s active plan (or free if there’s no subscription) and reads config/billing.php for the limits.
Enforcement applied across every controller
ChatwootChannelController (already in place ✅)
All 4 channel creation methods were already checking the plan:
createWebWidget()→canUseChannel($company, 'web')createEmail()→canUseChannel($company, 'email')createInstagram()→canUseChannel($company, 'instagram')createFacebookMessenger()→canUseChannel($company, 'facebook')
DocumentController (new 🔒)
storeDocumentMetadata()now checkscanAddDocument()before creating the record- Free plan: 0 documents → blocked entirely
- Pro plan: 10 documents maximum
- Enterprise: unlimited (
max_documents = -1)
N8nWorkflowController (new 🔒)
createWorkflowForCompany()now checkscanCreateWorkflow()before calling n8n- Free plan: 0 workflows → blocked entirely
- Pro plan: 3 workflows maximum
TeamInvitationController (new 🔒)
store()now checkscanAddMember()after validating duplicates- Counts current users + pending invitations against
max_members - Free plan: 1 member maximum (the owner) → can’t invite anyone
Every endpoint returns HTTP 403 with upgrade_required: true when the limit is exceeded, so the frontend can show the upgrade prompt.
Pro plan: all 5 limits fully enforced
The Pro plan ($24.990/month) is WITHMIA’s most popular. With real enforcement, each of its limits is now validated in the backend:
Channels: all 5 ✅
- WhatsApp, Instagram, Facebook Messenger, Email, Web Chat
canUseChannel()allows the 5 channels configured inbilling.plans.pro.channels- Only API Access stays locked (requires Business or Enterprise)
RAG documents: 10 maximum ✅
canAddDocument()counts the company’sKnowledgeDocumentrecords- At 10, the endpoint returns 403 with an upgrade message
- To upload more → upgrade to Business (50) or Enterprise (unlimited)
Workflows: 3 maximum ✅
canCreateWorkflow()counts theWhatsAppInstancerecords with an activen8n_workflow_id- At 3, creating new bots is blocked
- For more → upgrade to Business (10) or Enterprise (unlimited)
Members: 1 included + paid extras ✅
canAddMember()counts users + pending invitations againstmax_members- Pro includes 1 member by default
- Extra members: $10.500 CLP/month each (paid via Flow.cl/dLocal)
- Every extra member increments
max_membersautomatically once payment is confirmed
AI messages: 2,000/month ✅
AiUsageService.canSendMessage()— already in place before v1.0.8- Email alerts go out at 90% and 100%
- Overage: $5.990 CLP per additional 1,000 messages (5,000 extra maximum)
AI models: GPT-4o-mini + GPT-4o
getRecommendedModel()routes automatically by plan- Pro can use both models depending on how complex the message is
Free plan: now with WhatsApp + Web Chat
A strategic decision: the Free plan now includes 2 channels instead of just WhatsApp.
Why?
The web chat widget is an underexploited market in Latin America. Offering it for free lets more businesses try WITHMIA on their own website (WordPress, Shopify, Wix) with no commitment, and discover the platform’s value organically.
What changed
| Layer | Before | Now |
|---|---|---|
config/billing.php | channels: ['whatsapp'] | channels: ['whatsapp', 'web'] |
SubscriptionPage.tsx | ”WhatsApp only" | "WhatsApp + Web Chat” |
Pricing.tsx (landing) | “1 channel (WhatsApp)" | "2 channels (WhatsApp + Web Chat)“ |
| Comparison table | Web chat ❌ on free | Web chat ✅ on free |
IntegrationSection.tsx | Web chat without proOnly | No change (already correct) |
What stays locked on Free
- Instagram, Facebook Messenger, Email → require Pro or above
- RAG documents → 0 allowed
- Workflows → 0 allowed
- Extra members → owner only
Technical summary
Files modified
Backend:
config/billing.php— free.channels updated to['whatsapp', 'web']app/Http/Controllers/Api/DocumentController.php— enforcement withcanAddDocument()app/Http/Controllers/Api/N8nWorkflowController.php— enforcement withcanCreateWorkflow()app/Http/Controllers/Api/TeamInvitationController.php— enforcement withcanAddMember()app/Services/PlanEnforcementService.php— reviewed and completed (already existed)
APP frontend:
resources/js/pages/subscription/SubscriptionPage.tsx— copy updated
Landing page (WEBPAGE):
WEBPAGE/withmia-main/src/components/Pricing.tsx— features, comparison table and FAQ
The 403 response pattern
Every protected endpoint returns the same shape:
{
"success": false,
"error": "Has alcanzado el límite de X de tu plan. Actualiza tu plan para Y.",
"upgrade_required": true
}
v1.0.8 turns WITHMIA from a platform with cosmetic restrictions into one with real enforcement at every endpoint. And at the same time, it makes the Free plan more appealing with Web Chat included. Security and growth in a single release.
Labels
Comments
Be respectful. Your email will not be published.