Open
Conversation
Contributor
Author
|
Related PRs for the email localization pipeline:
|
Pass the resolved checkout locale through to /checkout/start so backend systems can persist it for lifecycle email localization. - Add locale field to CheckoutStartParams, CheckoutStartRequestParams, and PaddleStartCheckoutParams - All 4 UI flows (WebBilling, Stripe, Stripe Express, Paddle) now send selectedLocale to the backend - Locale is omitted from the request body when not set (backward compat)
e4293da to
2c537d4
Compare
vicfergar
approved these changes
Apr 8, 2026
Address review feedback from vicfergar: - Send locale in /checkout/complete request body (same pattern as email) - Add explicit locale test for StripeCheckoutPurchasesUi - Add locale tests for postCheckoutComplete (include/omit) The complete endpoint needs locale for the checkout portal flow where locale is only known at completion time, not at start.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pass the resolved checkout locale through to both
/checkout/startand/checkout/completeso Khepri can persist it for lifecycle email localization.Linear: WEB-4004
Blocked by:
localein checkout schemas) — without this, Khepri rejects the field with error 7226 "Illegal parameters locale"What changed
/checkout/start— Addlocale?: stringto:CheckoutStartParams(purchase-operation-helper)CheckoutStartRequestParams(backend)PaddleStartCheckoutParams(paddle-service)All 4 checkout flows now send
selectedLocaleaslocale:purchases-ui.svelte)stripe-checkout-purchases-ui.svelte)express-purchase-button.svelte)paddle-purchases-ui.svelte)/checkout/complete— Addlocale?: stringto:postCheckoutComplete(backend)checkoutComplete(purchase-operation-helper)Sent from 2 call sites:
payment-entry-page.sveltevia$translator.selectedLocale)express-purchase-button.svelteviatranslator.selectedLocale)This covers the checkout portal flow where locale is only known at completion time.
When no locale is set, the field is omitted from the request body (backward compatible).
Naming decisions
selectedLocale/defaultLocale(existing, unchanged)locale— matches Stripe/Paddle conventions and Khepri's schematimezone,localeSource,timezoneSource(documented in comments)customerEmailkeeps its prefix (ambiguous without it);localedoesn't need oneVerified locally
localeappears in the/checkout/startrequest payloadTest plan
localeconfirmed in request body via DevTools