#z3ntl3_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1263421714952491009
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- z3ntl3_checkout-embedded, 15 hours ago, 66 messages
- z3ntl3_connect-dashboard, 1 day ago, 11 messages
- z3ntl3_api, 1 day ago, 9 messages
so how can i change the invoice locale? in that case
๐ happy to help
does changing the locale https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-locale on the checkout session achieve what you're looking for?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
it didnt really help other than making the checkout just display in the locale 's language, the invoice is still in english
๐
Can you share the in_xxx ID?
oke
u mean the id of the invoice created by the checkout session?
wait imma get
invoice: in_1Pdqb2QnBUYiXKHEgxhfRYoQ
and this invoice in on my connected account id : acct_1PNWUvQnBUYiXKHE
Thanks, checking
oke ty
Hmm, I can see you passed locale: 'nl' and that should take precedence when creating the customer (setting preferred_locales) and subsequently the invoice. But didn't in this case en-GB is the default. Checking why
ye
and i did lookup for the language tag, it comforts the IETF language tag requirement so idk how it went wrong
Can you try the same again but with locale: 'nl-NL'?
oke
But looking at the code, nl should be sufficient. Is the payment page localised?
*stripe.Error {"status":400,"message":"Invalid locale: must be one of auto, bg, cs, da, de, el, en, en-GB, es, es-419, et, fi, fil, fr, fr-CA, hr, hu, id, it, ja, ko, lt, lv, ms, mt, nb, nl, pl, pt, pt-BR, ro, ru, sk, sl, sv, th, tr, vi, zh, zh-HK, or zh-TW","param":"locale","request_id":"req_SPRtAb6l2J9dpU","request_log_url":"https://dashboard.stripe.com/acct_1PNWUvQnBUYiXKHE/test/logs/req_SPRtAb6l2J9dpU?t=1721295540","type":"invalid_request_error"}
req_SPRtAb6l2J9dpU
Ok, and if you use locale: 'nl is the payment page localised as you'd expect?
i had that before and it did personalize the checkout page, however i also want the invoice that is created together after the payment to be in dutch as well
completely dutch here so it works
Yeah just want to confirm that the payment page is localised and the issue is isolated to the customer/invoice
but after the payment, the invoice is not dutch
OK, this just looks like a bug unfortunately. I'll file it internally and we can take a look
oke thank you
approximately how long would it take to push a patch that solves this? and it wouldnt introduce breaking changes on the client, but rather a change on the infrastructure
imma refine my question cuz when re-reading its confusing
Unfortunately you can't update the invoice locale post-payment. The workaround would be to create the Customer object before Checkout Session, with preferred_locales: ['nl-NL'] and pass the cus_xxx ID to the customer parameter
You won't need to update the Go client and/or API version no. Just. a bug fix in the API
i read that too on the docs but for me i dont really wanna follow that approach
otherwise i gotta change some parts and im a bit lazy in that ๐
Yeah I get that, but only way it'll work for now until this is fixed
oke anyways thnx
can u pls ping me when its fixed, or where can i see when it is fixed
You'd need to write in and we can update you: https://support.stripe.com/contact/email?topic=api_integration
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
oke ty
Hmm, actually I think this is actually how it is designed to work
The browser locale will always take precedence over whatever locale you pass on session creation. Can you try and change the locale in your browser? I assume it's en-GB?
but shouldnt checkout session allow a way to have an option that allows the user to determine the invoice locale as well, cuz im using customer_creation: if_required
ye my browser is english locale
In this instance we made a design decision for the browser locale (user preference) to take precednece over the merchant set locale
Can you test if changing browser locale works?
ye testing rn
YEP
that worked
thats btw a very nice feature, but pls make a note in the docs for it cuz i literally went through the whole api ref, the docs as well but couldnt find anything
Yeah I had a recollection of when we designed this that was how it worked
Where would you expect to see this documented?
(genuine question)
ehmm
i think a note on the api ref for checkout session, stating that when you use customer_creation: if_required and still want to set invoice locale, notice that the browser's locale takes precedence and the invoice locale will preserve the locale of the customer's browser that went through the checkout session
/ or something like that
cuz i felt a bit confused when i coudlnt find anything, however it was just something pretty simple but unnoticed due to lack of documentation on this one i think
OK, thanks for the feedback! We'll figure out where this should go and make sure it explains the behaviour
k thnx, and the help plus assistance is pretty appreciated! have a great day