feat: payment_links table + outstanding balance emails + monthly billing cleanup #523
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/basketball-api#523
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
project-westside-basketballRepo
ldraney/basketball-apiUser Story
As an admin, I want to send outstanding balance emails to parents with unpaid payment links so they can pay individual items directly.
Context
This work was deployed to prod via hotfix on 2026-05-18 to recover from a 37-day outage. Migration 048 was applied to the DB on ~May 7 but never committed. This issue tracks bringing main up to date with what's running.
File Targets
alembic/versions/048_add_payment_links_table.py— new migrationsrc/basketball_api/models.py— PaymentLink model + PaymentLinkStatus enumsrc/basketball_api/routes/admin.py— outstanding balance endpoint + subscription filtersrc/basketball_api/routes/checkout.py— remove prorationsrc/basketball_api/services/email.py— outstanding balance email + cleanup first-payment copysrc/basketball_api/services/email_queries.py— outstanding_balances queryscripts/backfill_payment_links.py— backfill scriptTest Expectations
Acceptance Criteria
payment_linkstable exists with correct schema (migration 048)PaymentLinkmodel matches migrationPOST /email/outstanding-balanceendpoint worksoutstanding_balancesquery registered in blast systemConstraints
Checklist
Related
project-westside-basketball— parent project