feat: jersey size selection in checkout flow #141
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
forgejo_admin/basketball-api#141
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
plan-wkq→ Phase 11 (Girls Tryout) → discovered during jersey email blast 2026-03-21Parent reported no size option on jersey checkout page.
Repo
forgejo_admin/basketball-apiUser Story
As a parent, I want to select a jersey size during checkout so that my child gets the right fit
Context
The jersey checkout flow has no size selection. Parents pick an option ($90/$130/opt-out) but never specify a size. Size is carried as Stripe session metadata alongside
jersey_optionandplayer_id— no new Stripe Products or Prices needed. The webhook reads it back on payment confirmation and saves to a newjersey_sizecolumn on the players table.File Targets
Files the agent should modify:
src/basketball_api/routes/jersey.py— acceptsizeparam inPOST /jersey/checkout, pass to Stripe session metadatasrc/basketball_api/routes/webhooks.py— readjersey_sizefrom Stripe metadata oncheckout.session.completed, save to playersrc/basketball_api/models.py(or wherever Player model lives) — addjersey_sizecolumn (string enum: YS, YM, YL, YXL, AS, AM, AL, AXL)alembic/versions/— new migration addingjersey_sizecolumn to players tablesrc/basketball_api/routes/jersey.py— addGET /jersey/sizesendpoint returning available sizesFiles the agent should NOT touch:
src/basketball_api/services/email.py— email templates are separatesrc/basketball_api/routes/admin.py— admin endpoints unrelatedAcceptance Criteria
POST /jersey/checkoutacceptssizeparam and passes it as Stripe session metadatajersey_sizePOST /jersey/checkoutrejects requests withoutsize(except opt-out)jersey_sizefrom metadata and saves toplayer.jersey_sizeGET /jersey/sizesreturns available sizes (YS, YM, YL, YXL, AS, AM, AL, AXL)jersey_sizecolumnTest Expectations
pytest tests/ -k jerseyConstraints
Checklist
Related
plan-wkq— Phase 11project-westside-basketball