[DONE] Add payment_links table and outstanding balance email #518
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#518
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
User Story
As a coach, when a parent asks "how do I pay?", I need to look up their player and resend a persistent payment link. As an admin, I need to blast all parents an email showing everything they owe with a Pay Now link per item.
Lineage
Standalone — enables payment link persistence and outstanding balance emails.
Repo
basketball-api
Context
Stripe Payment Links don't expire (unlike Checkout Sessions). We mint one per product per player, store it in a dedicated
payment_linkstable, and use it for outstanding balance emails and on-demand resend.Acceptance Criteria
payment_linkstable with schema: player_id, parent_id, product_id, description, amount_cents, stripe_payment_link_id, stripe_payment_link_url, status, order_id, paid_atoutstanding_balanceEmailType enum value addedquery_outstanding_balancesin QUERY_REGISTRYsend_outstanding_balance_emailbranded email functionPOST /admin/email/outstanding-balance?test_email=endpointFile Targets
src/basketball_api/models.py— PaymentLinkStatus enum, PaymentLink model, outstanding_balance EmailTypealembic/versions/048_add_payment_links_table.py— migrationscripts/backfill_payment_links.py— backfill scriptsrc/basketball_api/services/email_queries.py— query_outstanding_balancessrc/basketball_api/services/email.py— send_outstanding_balance_emailsrc/basketball_api/routes/admin.py— POST /admin/email/outstanding-balanceTest Expectations
Constraints
_brand_wrapper(System 1) for email stylingChecklist
Related
Add payment_links table and outstanding balance emailto [DONE] Add payment_links table and outstanding balance email