Admin Stripe invoices + recurring subscriptions (customers pay us) #24

Merged
westfarn merged 19 commits from feature/23-admin-stripe-invoices into master 2026-07-31 12:02:41 -07:00
Owner

Summary

Test plan

  • Set Stripe test keys in local .env and restart app
  • As superuser: Dashboard → Invoices → create one-off invoice; confirm Stripe invoice + email
  • As superuser: create monthly subscription; open Checkout link; complete with test card 4242…
  • Configure Stripe CLI or Dashboard webhook → confirm status updates to paid/active
  • Non-admin user cannot open /financial/invoices
  • Prod: add live keys + webhook secret to server .env, migrate, restart; point webhook to https://aimloperations.com/financial/stripe/webhook/

Notes

Uses stdlib HTTP to Stripe API (no stripe PyPI package) so deploys stay dependency-light.

## Summary - Closes #23 - Admin-only invoice dashboard under `/financial/invoices` (superuser) - One-off Stripe hosted invoices + email pay link (customers pay us) - Monthly (or weekly/yearly) Stripe Checkout subscriptions + email checkout link - Webhook at `/financial/stripe/webhook/` syncs invoice/subscription status - Env docs: `STRIPE_SECRET_KEY`, `STRIPE_PUBLISHABLE_KEY`, `STRIPE_WEBHOOK_SECRET` ## Test plan - [ ] Set Stripe **test** keys in local `.env` and restart app - [ ] As superuser: Dashboard → Invoices → create one-off invoice; confirm Stripe invoice + email - [ ] As superuser: create monthly subscription; open Checkout link; complete with test card `4242…` - [ ] Configure Stripe CLI or Dashboard webhook → confirm status updates to paid/active - [ ] Non-admin user cannot open `/financial/invoices` - [ ] Prod: add live keys + webhook secret to server `.env`, migrate, restart; point webhook to `https://aimloperations.com/financial/stripe/webhook/` ## Notes Uses stdlib HTTP to Stripe API (no `stripe` PyPI package) so deploys stay dependency-light.
westfarn added 19 commits 2026-07-31 12:02:01 -07:00
Closes #23: one-off hosted invoices, monthly Checkout subscriptions, pay-link email, and webhook status sync for admins.
Update company_site/financial/templates/financial/subscription_new.html for Stripe invoices (#23)
CI / test (pull_request) Successful in 13s
Unit Tests / test (pull_request) Successful in 11s
0ba6710faa
westfarn force-pushed feature/23-admin-stripe-invoices from 04226abc19 to 0ba6710faa 2026-07-31 12:02:01 -07:00 Compare
westfarn merged commit b98f504afc into master 2026-07-31 12:02:41 -07:00
westfarn deleted branch feature/23-admin-stripe-invoices 2026-07-31 12:02:41 -07:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ai_ml_operations/company_site#24