Stripe webhook ignores promo registration payments — signup_method filter too strict #400
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#400
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
Bug
Lineage
Discovered during Stripe/DB reconciliation on 2026-04-08. kevin porja paid $15 via Stripe but DB shows pending.
Repo
forgejo_admin/basketball-apiWhat Broke
The Stripe webhook handler for
checkout.session.completedatsrc/basketball_api/routes/webhooks.py:360filters registrations bysignup_method == "stripe". Promo discount registrations havesignup_method = "promo_discount"even though they pay through Stripe checkout at a discounted price. The webhook arrives, the filter excludes the registration, payment is never recorded.Result: player shows as unpaid in the CRM even though Stripe charged them. Marcus sees incorrect payment status.
Repro Steps
signup_method=promo_discount)checkout.session.completedwithtype=tryout_registrationmetadataRegistration.signup_method == "stripe"— no matchpendingExpected Behavior
The webhook handler should match registrations regardless of
signup_method. Any registration with matchingregistration_idfrom the Stripe metadata should be updated topaidwhen the checkout completes.Fix: change line ~360 from:
to either remove the filter entirely, or expand it:
Environment
Acceptance Criteria
registration_idwithout filtering onsignup_methodpaid(manual fix or webhook replay)Related
project-westside-basketballstory:WS-S17— parent registrationforgejo_admin/basketball-api#350— webhook fix (same handler)src/basketball_api/routes/webhooks.py:360