Jersey selection page with Stripe checkout #44
Labels
No labels
domain:backend
domain:devops
domain:frontend
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/westside-landing#44
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 → Jersey ordering for second tryoutRepo
forgejo_admin/westside-appUser Story
As a parent
I want to select and pay for my player's jersey option from an email link
So that the jersey is ordered and tracked to my player's account
Context
Parents receive an announcement email with a link to
https://westside.tail5b443a.ts.net/jersey?token={registration_token}. This page shows 3 jersey options ($90 reversible, $130 jersey+warmup, opt out). Selecting an option calls the basketball-api to create a Stripe Checkout Session, then redirects to Stripe's hosted checkout page. After payment, Stripe redirects back to a success page.The token (parent's
registration_token) authenticates without requiring Keycloak login — parents click the email link and go straight to the selection page. The basketball-apiPOST /jersey/checkoutendpoint handles the Stripe session creation.API base URL is in
src/lib/api.js(API_BASE). TheapiFetchhelper handles auth'd requests but jersey checkout uses token auth (query param), not Bearer token.File Targets
Files the agent should modify or create:
src/routes/jersey/+page.svelte— NEW: jersey selection landing pagetokenfrom URL query paramsGET /jersey/options/jersey/checkout?token={token}with{option: "reversible"}(or "jersey_warmup" or "opt_out")src/routes/jersey/success/+page.svelte— NEW: post-checkout success pagesrc/routes/jersey/cancel/+page.svelte— NEW: checkout cancelled pageFiles the agent should NOT touch:
src/routes/register/+page.svelte— registration is separatesrc/routes/players/[id]/billing/+page.svelte— billing is for subscriptionsAcceptance Criteria
/jersey?token={valid_token}shows 3 jersey option cards with prices/jersey/successshows confirmation message after payment/jersey/cancelshows cancellation message with retry link#d42026, black#0a0a0a) used throughoutTest Expectations
/jersey?token=test, verify cards rendernpm run check(Svelte type check)Constraints
src/app.css— match the existing card/info-card patternsapiFetchfor the jersey checkout call — it adds Bearer token auth. Instead use a plainfetchwith the token as a query param (the backend validates the token, not a JWT)https://westside.tail5b443a.ts.net/jersey/successandhttps://westside.tail5b443a.ts.net/jersey/cancelChecklist
npm run checkpassesRelated
phase-wkq-11-girls-tryout— jersey ordering for second tryout