Stripe is not integrated today. Mentions of Stripe only appear in marketing/pricing copy (web design add-on catalog). There is:
No stripe (or dj-stripe) dependency in pyproject.toml
No Stripe API keys / webhook secrets in .env.example or .env.prod.example
No invoice, payment, or customer billing models/views in financial
financial today covers contracts, charge numbers, timekeeping, employees, and user profiles. Access control already has financial_admin_required (superuser) and related helpers in financial/permissions.py.
There is an invoice PDF template at company_site/Inoivce Template.pdf that can inform layout/branding.
Email (SMTP2GO) is already configured via env — usable for pay-link notifications.
Goal
When logged in as an admin, be able to:
Create one-off invoices (customer pays us)
Create monthly recurring invoices / subscriptions (customer pays us on a schedule)
On create: email the customer a payment link
View invoices / payment status / history in the logged-in admin UI
Track payment status via Stripe (paid / open / past due / failed, etc.)
All create/list/detail surfaces are admin-only (reuse financial_admin_required / superuser).
Money direction (decided)
Inbound only: customers pay us. One-off and monthly recurring both collect payment from the customer. Not vendor payouts / AP.
RecurringInvoice / subscription mirror for monthly customer payments
Acceptance criteria
Non-admin users cannot see or create invoices/payments.
Admin can create a one-off invoice → Stripe object created → email sent with pay link → admin can open detail and see status.
Admin can set up a monthly recurring customer payment → Stripe subscription/recurring invoice created → email with pay link → admin can view status/history.
Stripe webhook updates local status when paid/failed/canceled.
Secrets only in env; documented in .env.example / .env.prod.example.
Notes
Reuse Inoivce Template.pdf branding where useful for PDF export (nice-to-have; pay link is MVP).
## Context / current state
**Stripe is not integrated today.** Mentions of Stripe only appear in marketing/pricing copy (web design add-on catalog). There is:
- No `stripe` (or dj-stripe) dependency in `pyproject.toml`
- No Stripe API keys / webhook secrets in `.env.example` or `.env.prod.example`
- No invoice, payment, or customer billing models/views in `financial`
`financial` today covers contracts, charge numbers, timekeeping, employees, and user profiles. Access control already has `financial_admin_required` (superuser) and related helpers in `financial/permissions.py`.
There is an invoice PDF template at `company_site/Inoivce Template.pdf` that can inform layout/branding.
Email (SMTP2GO) is already configured via env — usable for pay-link notifications.
---
## Goal
When logged in as an **admin**, be able to:
1. **Create one-off invoices** (customer pays us)
2. **Create monthly recurring invoices / subscriptions** (customer pays us on a schedule)
3. On create: **email the customer a payment link**
4. **View** invoices / payment status / history in the logged-in admin UI
5. Track payment status via **Stripe** (paid / open / past due / failed, etc.)
All create/list/detail surfaces are **admin-only** (reuse `financial_admin_required` / superuser).
### Money direction (decided)
**Inbound only:** customers pay us. One-off and monthly recurring both collect payment from the customer. Not vendor payouts / AP.
---
## Requirements
### Auth & UI
- [ ] Admin-only invoice dashboard (list + filters: status, customer, date)
- [ ] Create one-off invoice form (customer, line items, amount, due date, notes)
- [ ] Create monthly recurring invoice / subscription form (customer, amount, cadence, start date)
- [ ] Invoice/payment detail page with Stripe status, pay link, email history
- [ ] Link from financial nav (admin only)
### Stripe
- [ ] Add Stripe SDK dependency + env vars (`STRIPE_SECRET_KEY`, `STRIPE_PUBLISHABLE_KEY`, `STRIPE_WEBHOOK_SECRET`)
- [ ] Create Stripe Invoice / Payment Link (or Checkout Session) for one-off invoices
- [ ] Create Stripe Subscription (or recurring Invoice) for monthly customer payments
- [ ] Webhook endpoint to sync payment status into local models
- [ ] Store Stripe IDs on local records (customer, invoice, subscription, payment intent)
### Email
- [ ] On invoice / subscription create: send email with payment link (SMTP2GO already wired)
- [ ] Optional: remind / failure emails later (out of scope unless easy)
### Data model (suggested)
- [ ] `Invoice` (or reuse Stripe objects + thin local mirror): amount, currency, status, customer, stripe ids, created_by, due_date
- [ ] `Customer` contact (email required for pay link)
- [ ] `RecurringInvoice` / subscription mirror for monthly customer payments
---
## Acceptance criteria
1. Non-admin users cannot see or create invoices/payments.
2. Admin can create a one-off invoice → Stripe object created → email sent with pay link → admin can open detail and see status.
3. Admin can set up a monthly recurring customer payment → Stripe subscription/recurring invoice created → email with pay link → admin can view status/history.
4. Stripe webhook updates local status when paid/failed/canceled.
5. Secrets only in env; documented in `.env.example` / `.env.prod.example`.
---
## Notes
- Reuse `Inoivce Template.pdf` branding where useful for PDF export (nice-to-have; pay link is MVP).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Context / current state
Stripe is not integrated today. Mentions of Stripe only appear in marketing/pricing copy (web design add-on catalog). There is:
stripe(or dj-stripe) dependency inpyproject.toml.env.exampleor.env.prod.examplefinancialfinancialtoday covers contracts, charge numbers, timekeeping, employees, and user profiles. Access control already hasfinancial_admin_required(superuser) and related helpers infinancial/permissions.py.There is an invoice PDF template at
company_site/Inoivce Template.pdfthat can inform layout/branding.Email (SMTP2GO) is already configured via env — usable for pay-link notifications.
Goal
When logged in as an admin, be able to:
All create/list/detail surfaces are admin-only (reuse
financial_admin_required/ superuser).Money direction (decided)
Inbound only: customers pay us. One-off and monthly recurring both collect payment from the customer. Not vendor payouts / AP.
Requirements
Auth & UI
Stripe
STRIPE_SECRET_KEY,STRIPE_PUBLISHABLE_KEY,STRIPE_WEBHOOK_SECRET)Email
Data model (suggested)
Invoice(or reuse Stripe objects + thin local mirror): amount, currency, status, customer, stripe ids, created_by, due_dateCustomercontact (email required for pay link)RecurringInvoice/ subscription mirror for monthly customer paymentsAcceptance criteria
.env.example/.env.prod.example.Notes
Inoivce Template.pdfbranding where useful for PDF export (nice-to-have; pay link is MVP).Admin invoices + Stripe: one-off invoices, vendor recurring payments, pay-link emailsto Admin invoices + Stripe: one-off + monthly recurring (customers pay us), pay-link emails