Add skip_proration flag to first-payment endpoint and checkout route #458
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#458
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 Marcus's 2026-04-12 custom contract batch (Jaxon Gerber $50/mo flat rate). Related to
forgejo_admin/basketball-api #424(prior batch).Repo
forgejo_admin/basketball-apiUser Story
As an admin,
I want to send a first-payment email with a flat fee (no proration)
So that players with custom deals get charged the exact amount agreed upon.
Context
send_first_payment_email()andGET /checkout/first-paymentboth auto-prorate via_calculate_prorated_fee()(formula:round(fee * 25/30 / 5) * 5). Marcus requested Jaxon Gerber (id=106) at $50/mo flat — no proration. Current code would show $40 in the email and charge $40 at Stripe checkout. No override exists.Both the endpoint and checkout live on branch
369-first-payment-email-blast(not yet merged to main). The branch is deployed to the running pod.File Targets
Files the agent should modify:
src/basketball_api/services/email.py—send_first_payment_email()acceptsskip_prorationbool, skips_calculate_prorated_fee()when true, adjusts email text to say "April fee" instead of "Prorated April fee"src/basketball_api/routes/admin.py—POST /admin/email/first-paymentacceptsskip_prorationquery param, passes through to send functionsrc/basketball_api/routes/checkout.py—GET /checkout/first-paymentacceptsproratequery param (default true), chargesmonthly_fee * 100cents directly when falseFiles the agent should NOT touch:
src/basketball_api/services/email_queries.py— not relatedsrc/basketball_api/services/outbox.py— not relatedAcceptance Criteria
skip_proration=trueon the blast endpoint, email shows flat fee (e.g. "$50") not prorated fee ("$40")skip_proration=true, checkout URL includes&prorate=falsequery paramprorate=falseon checkout route, Stripe session usesmonthly_fee * 100cents directlyTest Expectations
send_first_payment_emailwithskip_proration=Trueuses monthly_fee directlysend_first_payment_emailwithskip_proration=False(default) prorates as beforeprorate=falsecharges exact monthly_fee * 100pytest tests/test_first_payment_email.py tests/test_first_payment_blast.py -vConstraints
369-first-payment-email-blast, not main (that's where the endpoint lives)routes/admin.pyChecklist
Related
project-westside-basketball— parent projectsop-contract-offer— contract offer operational SOPstory:WS-S23— custom contract terms per player