121 lines
3.9 KiB
Markdown
121 lines
3.9 KiB
Markdown
# EPICA: EPIC-MGN-016 - Billing SaaS
|
|
|
|
## Metadata
|
|
|
|
| Campo | Valor |
|
|
|-------|-------|
|
|
| **ID** | EPIC-MGN-016 |
|
|
| **Nombre** | Billing SaaS (Per-Seat Pricing) |
|
|
| **Modulo** | billing |
|
|
| **Fase** | Fase 4 - SaaS Platform |
|
|
| **Prioridad** | P3 |
|
|
| **Estado** | Backlog |
|
|
| **Story Points** | 42 |
|
|
| **Sprint(s)** | Sprint 19-21 |
|
|
|
|
---
|
|
|
|
## Descripcion
|
|
|
|
Sistema de facturacion SaaS con modelo per-seat (por asiento/usuario). Incluye suscripciones mensuales por tenant, planes con feature flags (Starter, Growth, Enterprise), cupones/descuentos, historial de cambios de suscripcion y facturacion automatica.
|
|
|
|
---
|
|
|
|
## Objetivo de Negocio
|
|
|
|
Proveer billing que:
|
|
- Monetice la plataforma por usuarios activos
|
|
- Soporte diferentes niveles de planes
|
|
- Automatice facturacion recurrente
|
|
- Facilite upselling con feature flags
|
|
- Gestione promociones y cupones
|
|
|
|
---
|
|
|
|
## Historias de Usuario
|
|
|
|
| ID | Historia | Prioridad | SP | Estado |
|
|
|----|----------|-----------|-----|--------|
|
|
| US-MGN016-001 | Como tenant owner, quiero ver mi plan actual y usuarios | P0 | 3 | Backlog |
|
|
| US-MGN016-002 | Como tenant owner, quiero agregar/remover usuarios de mi plan | P0 | 5 | Backlog |
|
|
| US-MGN016-003 | Como tenant owner, quiero cambiar mi plan (upgrade/downgrade) | P0 | 8 | Backlog |
|
|
| US-MGN016-004 | Como tenant owner, quiero ver mis facturas | P0 | 3 | Backlog |
|
|
| US-MGN016-005 | Como tenant owner, quiero gestionar mis metodos de pago | P0 | 5 | Backlog |
|
|
| US-MGN016-006 | Como tenant owner, quiero aplicar cupones de descuento | P1 | 3 | Backlog |
|
|
| US-MGN016-007 | Como admin, quiero configurar planes y precios | P0 | 5 | Backlog |
|
|
| US-MGN016-008 | Como sistema, quiero generar facturas automaticas mensualmente | P0 | 8 | Backlog |
|
|
| US-MGN016-009 | Como admin, quiero ver metricas de MRR y churn | P1 | 5 | Backlog |
|
|
|
|
**Total Story Points:** 45 SP (ajustado a 42)
|
|
|
|
---
|
|
|
|
## Criterios de Aceptacion de la Epica
|
|
|
|
**Funcionales:**
|
|
- [ ] Suscripciones mensuales por tenant
|
|
- [ ] Modelo per-seat: base + (extra seats x precio)
|
|
- [ ] 3 planes: Starter ($99, 5 users), Growth ($249, 25 users), Enterprise (custom)
|
|
- [ ] Feature flags por plan (WhatsApp, AI, etc.)
|
|
- [ ] Cupones con % o monto fijo
|
|
- [ ] Prorratas en cambios de plan
|
|
- [ ] Facturacion automatica dia 1 del mes
|
|
- [ ] Integracion con MercadoPago/Stripe
|
|
|
|
**No Funcionales:**
|
|
- [ ] PCI DSS compliance (no guardar tarjetas)
|
|
- [ ] Alta disponibilidad del proceso de cobro
|
|
|
|
---
|
|
|
|
## Modelo de Precios
|
|
|
|
| Plan | Base/mes | Usuarios incluidos | Usuario extra | Features |
|
|
|------|----------|-------------------|---------------|----------|
|
|
| Starter | $99 USD | 5 | $15 | Core modules |
|
|
| Growth | $249 USD | 25 | $12 | + Reports, CRM |
|
|
| Enterprise | Custom | Ilimitados | Negociable | + WhatsApp, AI |
|
|
|
|
---
|
|
|
|
## Dependencias
|
|
|
|
**Esta epica depende de:**
|
|
| Epica/Modulo | Estado | Bloqueante |
|
|
|--------------|--------|------------|
|
|
| EPIC-MGN-004 Tenants | Ready | Si |
|
|
| EPIC-MGN-001 Auth | Ready | Si |
|
|
|
|
**Esta epica bloquea:**
|
|
| Epica/Modulo | Razon |
|
|
|--------------|-------|
|
|
| EPIC-MGN-017 Payments | Integracion de pagos |
|
|
| EPIC-MGN-018 WhatsApp | Feature flag |
|
|
| EPIC-MGN-019 AI Agents | Feature flag |
|
|
|
|
---
|
|
|
|
## Desglose Tecnico
|
|
|
|
**Database:**
|
|
- [ ] Schema: `billing`
|
|
- [ ] Tablas: 9 (tenant_owners, subscriptions, plans, invoices, invoice_lines, payments, coupons, coupon_redemptions, subscription_history)
|
|
- [ ] Funciones: calcular_monto_prorrateado
|
|
|
|
**Backend:**
|
|
- [ ] Modulo: `billing`
|
|
- [ ] Services: SubscriptionService, InvoicingService, PaymentService
|
|
- [ ] Endpoints: 15+
|
|
- [ ] Jobs: MonthlyBillingJob
|
|
- [ ] Tests: 35+
|
|
|
|
**Frontend:**
|
|
- [ ] Paginas: 5 (BillingDashboard, Plans, Invoices, PaymentMethods, Coupons)
|
|
- [ ] Componentes: PlanCard, InvoiceTable, PaymentMethodForm
|
|
- [ ] Stores: 1 (billingStore)
|
|
|
|
---
|
|
|
|
**Creada por:** Requirements-Analyst
|
|
**Fecha:** 2025-12-05
|