Reconcile orders table with minted Stripe Payment Links + add May Monthly product #517
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#517
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
Standalone — discovered during 2026-05-07 payment report generation. 51 Payment Links were minted manually via Stripe API but have no corresponding order rows in the database.
Repo
ldraney/basketball-apiUser Story
As Coach Marcus
I want every outstanding fee to have a corresponding order in the database with a permanent payment link
So that I can resend payment reminders to parents on demand without manually minting links each time
Context
On 2026-05-07, a full roster payment audit revealed 25 of 31 signed players owe money ($6,915 total). 51 Stripe Payment Links were minted — all verified active and permanent — but most have no corresponding order in the database. Additionally ~190 duplicate links were created during context resets and should be deactivated.
Current gaps:
The 51 verified links are queryable from Stripe API via
payment_links?limit=100filtering bymetadata.player_id. The last batch has full metadata; older tournament links have player_id only.File Targets
src/basketball_api/models.py— no schema change needed, but seed the May Monthly productsrc/basketball_api/services/monthly_checkout.py— review for order creation patternssrc/basketball_api/routes/admin.py— potential admin endpoint for link managementalembic/versions/048_*.py— data migration to create May product + insert missing orders with payment link URLsAcceptance Criteria
Test Expectations
alembic upgrade headSELECT count(*) FROM orders WHERE stripe_checkout_url LIKE 'https://buy.stripe.com/%'returns >= 51alembic upgrade head && pytest tests/ -k orderConstraints
monthly_checkout.pyChecklist
Related
project-westside-basketball— project this affects