Skip to content

fix: force Stripe checkout/portal locale to English#29

Open
spinsirr wants to merge 1 commit into
mainfrom
fix/stripe-locale-en
Open

fix: force Stripe checkout/portal locale to English#29
spinsirr wants to merge 1 commit into
mainfrom
fix/stripe-locale-en

Conversation

@spinsirr

Copy link
Copy Markdown
Owner

Summary

Users were seeing a Chinese Stripe checkout/portal even from English browsers. Root cause: we never passed locale, so Stripe's "auto" default kicks in — which blends Accept-Language with IP geolocation, and for the Billing Portal the Portal configuration's "Default language" setting in the Stripe Dashboard wins over request headers.

Since the app UI is English-only, hardcode locale: "en" on both the Checkout Session and the Billing Portal Session.

Test plan

  • bun run backend:check (deno lint + fmt)
  • Full pre-push suite (biome + eslint + typecheck + tests + backend lint + build)
  • Deploy billing edge function, open checkout from settings → page is English
  • Open Billing Portal from settings → page is English (even if Dashboard default is zh)

🤖 Generated with Claude Code

Stripe's `locale: "auto"` default combines browser `Accept-Language`
with IP geolocation, and for Billing Portal the Portal configuration's
default language in the Stripe Dashboard also applies. Result: users
were seeing a Chinese checkout/portal even from English browsers.

The app UI is English-only, so hardcode `locale: "en"` on both the
Checkout Session and Billing Portal Session to match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Apr 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
buildlog Ready Ready Preview, Comment Apr 18, 2026 8:14am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant