Revert PR #490 code changes — Stripe Checkout Session expires_at is capped at 24h #493
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#493
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
Emergency follow-up to PR #490 (issue #488). Deployed 2026-04-17, broke prod checkout for ~60 min. Reverted at the deployment overlay in pal-e-deployments #131. basketball-api main still contains the broken code — any future merge to main will rebuild broken image and the update-kustomize-tag step will overwrite the revert in pal-e-deployments.
Repo
forgejo_admin/basketball-apiUser Story
As an engineer, basketball-api main builds an image that works in prod. Right now it doesn't — the next merge to main will re-break checkout.
What Broke
PR #490 merged code that calls
stripe.checkout.Session.create(..., expires_at = int(time.time()) + 30 * 24 * 3600, ...)at 8 call sites. Stripe's real cap for Checkout Sessionexpires_atis 24 hours, not 30 days. Every call hits:The unit tests passed because they mocked
stripe.checkout.Session.create; mocks don't enforce Stripe's server-side constraint.Repro Steps
git checkout mainon basketball-api (current HEAD contains the #490 squash)Expected Behavior
basketball-api main builds an image whose checkout flows work in prod. Since Stripe's 24h cap cannot be raised via
expires_at, the correct architecture is not a TTL extension — it's one of:/pay/{token}(our backend mints fresh session on click)Both options are scoped under spike #489.
Environment
a4047d2c629...via pal-e-deployments #131Acceptance Criteria
expires_atcodeCHECKOUT_SESSION_TTL_SECONDSconstant set to a value Stripe rejects#488may need reopening with new title/scope, OR superseded by spike #489's chosen architectureRelated
forgejo_admin/basketball-api #488— original ticket (closed by #490's squash merge — closure is misleading, root problem unsolved)forgejo_admin/basketball-api #489— architecture spike (Payment Links vs lazy-mint); now load-bearingforgejo_admin/pal-e-deployments #130, #131— deployment revert that restored prodfeedback_retrieve_before_theorize.md— the missing sanity check