## T-04.3: Archive obsolete documentation - Created _archive/2026-01-07-trazas/ (5 files, 64 KB) - Created _archive/2026-01-10-simco-v37/ (51 files, 524 KB) - Created _archive/2026-01-10-sprint5/ (19 files, 216 KB) - Created _archive/_INDEX-ARCHIVED.md with full inventory - Total: 75 files archived, 816 KB organized ## T-04.4: Consolidate sprint history - Created HISTORICO-SPRINTS.md with 9 sprints documented - Sprint 1-5: Initial implementation (42 SP) - Sprint 6-9: Sales, Commissions, Portfolio, MLM/Goals (218 SP) - Total: 260 SP across 23 modules Directories cleaned: analisis/, analisis-previo/, planes/, trazas/ Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
88 lines
2.0 KiB
Markdown
88 lines
2.0 KiB
Markdown
# Analisis de Modulos Billing - BF-03
|
|
|
|
**Fecha:** 2026-01-10
|
|
**Fase:** 1.2 - Analisis de Modulos Billing
|
|
**Estado:** COMPLETADO
|
|
|
|
---
|
|
|
|
## Resumen Ejecutivo
|
|
|
|
| Modulo | Estado | Completitud |
|
|
|--------|--------|-------------|
|
|
| SAAS-004 Billing | Completado con discrepancias | 95% |
|
|
| SAAS-005 Plans | Completado | 100% |
|
|
|
|
---
|
|
|
|
## Discrepancias Principales
|
|
|
|
### Rutas Inconsistentes
|
|
|
|
| Documentado | Implementado | Accion |
|
|
|-------------|--------------|--------|
|
|
| `POST /billing/checkout` | `POST /stripe/checkout-session` | Actualizar doc |
|
|
| `POST /billing/portal` | `POST /stripe/billing-portal` | Actualizar doc |
|
|
| `GET /billing/plans` | `GET /plans` | Actualizar doc |
|
|
| `PUT /billing/change-plan` | `POST /billing/subscription/change-plan/:planId` | Actualizar doc |
|
|
|
|
### Campos Faltantes en Entidades TypeORM
|
|
|
|
**Subscription:**
|
|
- stripe_subscription_id (usar external_subscription_id)
|
|
- trial_start
|
|
- cancel_at
|
|
- price_amount
|
|
- currency
|
|
|
|
**Invoice:**
|
|
- amount_paid
|
|
- amount_due
|
|
- customer_name
|
|
- customer_email
|
|
|
|
### Endpoint Faltante
|
|
|
|
- `GET /billing/invoices/:id/pdf` - Documentado pero no implementado
|
|
|
|
---
|
|
|
|
## Webhooks Stripe
|
|
|
|
| Evento | Estado |
|
|
|--------|--------|
|
|
| customer.subscription.created | Implementado |
|
|
| customer.subscription.updated | Implementado |
|
|
| customer.subscription.deleted | Implementado |
|
|
| invoice.paid | Implementado |
|
|
| invoice.payment_failed | Implementado |
|
|
| payment_method.attached | Implementado (extra) |
|
|
| payment_method.detached | Implementado (extra) |
|
|
| checkout.session.completed | Implementado (extra) |
|
|
|
|
**Total:** 8 webhooks implementados (mas de los 6 documentados)
|
|
|
|
---
|
|
|
|
## Estado de Integracion Stripe
|
|
|
|
- Checkout funciona
|
|
- Webhooks se procesan
|
|
- Upgrade/downgrade funciona
|
|
- Facturas se generan
|
|
- Trial funciona
|
|
- Cancelacion funciona
|
|
|
|
---
|
|
|
|
## Recomendaciones
|
|
|
|
1. **CRITICA:** Crear entidades TypeORM para invoice_items y payments
|
|
2. **CRITICA:** Completar campos en Subscription e Invoice
|
|
3. **ALTA:** Actualizar documentacion con rutas reales
|
|
4. **ALTA:** Agregar endpoint GET /billing/invoices/:id/pdf
|
|
|
|
---
|
|
|
|
**Entregable de:** FASE 1.2
|