title: "055: Stripe Billing Implementation"
type: ticket
status: backlog
priority: critical
sprint: S001_base_and_mvp1
assignee: CM0
estimated_hours: 9
depends_on: ["047"]
last_updated: "2026-03-22"
055: Stripe Billing Implementation
Source
B2 research deliverable (047). Decision: Stripe Embedded Checkout + Odoo native provider.
Billing Model
| Tier |
Setup Fee (one-time) |
Monthly Subscription |
| Starter |
$1,500 |
$250/mo |
| Professional |
$3,000 |
$500/mo |
| Enterprise |
$6,000 |
$1,000/mo |
Implementation Steps
055.01: Stripe Account Setup (Shai — manual, 30 min)
- Create 3 Products in Stripe Dashboard
- Each product has 2 Prices: one-time setup + recurring monthly
- Note Price IDs for code integration
055.02: Odoo Stripe Provider Activation (CM0 — 30 min)
- Activate Stripe in: Accounting → Configuration → Payment Providers → Stripe
- Enter API keys (Publishable + Secret)
- Click "Generate your webhook" (creates /payment/stripe/webhook)
- Store API keys in Infisical (not plaintext)
055.03: Custom Webhook Controller (CM0 — 2 hrs)
controllers/stripe_webhook.py — extends Odoo native webhook
- Listens for
invoice.paid event
- Triggers CDE provisioning pipeline:
- Create Odoo Documents workspace
- Create Backblaze B2 storage bucket
- Create user accounts for stakeholders
- Generate BEP/EIR (call engine at 89.167.96.154:8010)
- Send welcome email with credentials + PDFs
- Create CRM opportunity → mark as Won
- Create Subscription record
055.04: Subscription Model (CM0 — 1 hr)
models/struxio_subscription.py
- Links Stripe subscription ID to STRUXIO tier + CDE workspace
- Fields: stripe_subscription_id, tier, status, customer, workspace_id
055.05: Wizard → Checkout Integration (CM0 — 1 hr)
- Connect /services/comply wizard to Stripe Checkout Session
- Checkout Session includes both line items (setup + monthly)
- Mode: subscription (handles mixed one-time + recurring)
055.06: CDE Provisioning Automation (CM0 — 3 hrs)
- Documents workspace creation
- B2 bucket creation
- User account creation + welcome email
- BEP/EIR generation call
055.07: End-to-End Testing (CM0 + B2 — 1 hr)
- Stripe test mode with test cards
- Full flow: wizard → checkout → webhook → provisioning → email
PCI Compliance
SAQ A (simplest) — Stripe handles all card data. We only need HTTPS (done via Caddy).
Webhook Events to Subscribe
checkout.session.completed
invoice.paid (triggers CDE provisioning)
invoice.payment_failed (dunning)
customer.subscription.deleted (cancellation)
customer.subscription.updated (tier change)
Acceptance Criteria
STRUXIO.ai // Confidential & Proprietary // © 2026