#z3ntl3_api

1 messages ยท Page 1 of 1 (latest)

pearl nexusBOT
#

๐Ÿ‘‹ 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.

lone stumpBOT
#

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.

misty anvil
#

so how can i change the invoice locale? in that case

torn zealot
#

๐Ÿ‘‹ happy to help

misty anvil
#

it didnt really help other than making the checkout just display in the locale 's language, the invoice is still in english

torn zealot
#

hmmm ok

#

give me a second

misty anvil
#

๐Ÿ‘

brave venture
#

Can you share the in_xxx ID?

misty anvil
#

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

brave venture
#

Thanks, checking

misty anvil
#

oke ty

brave venture
#

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

misty anvil
#

ye

#

and i did lookup for the language tag, it comforts the IETF language tag requirement so idk how it went wrong

brave venture
#

Can you try the same again but with locale: 'nl-NL'?

misty anvil
#

oke

brave venture
#

But looking at the code, nl should be sufficient. Is the payment page localised?

misty anvil
#
*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

brave venture
#

Ok, and if you use locale: 'nl is the payment page localised as you'd expect?

misty anvil
#

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

brave venture
#

Yeah just want to confirm that the payment page is localised and the issue is isolated to the customer/invoice

misty anvil
#

but after the payment, the invoice is not dutch

brave venture
#

OK, this just looks like a bug unfortunately. I'll file it internally and we can take a look

misty anvil
#

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

brave venture
#

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

misty anvil
#

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 ๐Ÿ˜‚

brave venture
#

Yeah I get that, but only way it'll work for now until this is fixed

misty anvil
#

oke anyways thnx

#

can u pls ping me when its fixed, or where can i see when it is fixed

brave venture
misty anvil
#

oke ty

pearl nexusBOT
brave venture
#

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?

misty anvil
#

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

misty anvil
brave venture
#

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?

misty anvil
#

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

brave venture
#

Yeah I had a recollection of when we designed this that was how it worked

brave venture
#

(genuine question)

misty anvil
#

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

brave venture
#

OK, thanks for the feedback! We'll figure out where this should go and make sure it explains the behaviour

misty anvil
#

k thnx, and the help plus assistance is pretty appreciated! have a great day