feat: Stripe card payment saves registration before redirect + webhook matching #110
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#110
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 1 (Commit Uncommitted Work)Repo
forgejo_admin/basketball-apiUser Story
As a parent registering for tryouts
I want my card payment to be linked to my registration
So that the system knows who paid and can auto-create my account
Context
Card payment flow previously redirected to a static Stripe Payment Link with no database connection. Stripe didn't know which player paid. This commit captures work done during the registration session: card payments now save the registration as
pending/stripebefore redirecting, and the webhook handler matches completed payments to pending registrations by parent email.File Targets
Files modified:
src/basketball_api/routes/register.py— card payment saves registration before redirectsrc/basketball_api/routes/webhooks.py— checkout.session.completed webhook matches by parent emailtests/test_promo_registration.py— updated test for new card payment behaviorAcceptance Criteria
pendingand signup_methodstripebefore Stripe redirectpaidon checkout.session.completedTest Expectations
pytest tests/test_promo_registration.py -vConstraints
routes/register.pyChecklist
Related
westside-basketball— project