#eroo36 — Checkout Customers

1 messages · Page 1 of 1 (latest)

solar zenith
#

Yes Checkout should create a new Customer that appears on the payment intent. I believe that Checkout will set country and language data based on what your Customer inputs. I assume you are looking for the language to be set on future Invoices?

noble python
#

exactly

#

thanks good to know

#

how does it exactly grab the language. i just tested it choosing country turkey but my language is set to united states(english)

#

could it be browser language

#

it still sets my language as english even thought payment screen was also in another language (after changing my browser language)

solar zenith
#

Where are you seeing English and where are you seeing Turkish here?

#

Also I think I misspoke a bit with language, I believe it technically saves "locale" info but I will need to look up again what exactly that gets set to

noble python
#

on the checkout screen where i enter my details credit card and stuff its turkish

#

i also select country turkey but then in the stripe dashboard > customers language on the left panel is english

#

if it doesnt automatically do it i will just customer update by checking the billing country

#

and set preferred languages

#

when i update the language of the customer manually i get the receipt in correct language which is good

solar zenith
#

Good that you are seeing the proper behavior with the manual update. Quick question: is this for Subscriptions or one time payments?

noble python
#

one time payments

#

for their receipts

solar zenith
#

Unfortunately it looks like there is not a good way to do this on the first one time payment that Checkout creates.

#

If you know in advance that your user is from a country, you can pre-create a Customer object and set the locale on them before creating the Checkout Session, otherwise I think that the first receipts for a user will all be in your default language. I will put in feedback about changing this

noble python
#

yes thanks for that for now i will check the billing address from the paymentintent

#

but the problem is when do i update it

#

is it too late if i update it when paymentintent completed event arrives?

#

does the invoice immediattly sent when paymentintent completed?

#

or maybe i sohuld update customer when payment intent is created already

trail bridge
#

Hi 👋 I'm stepping in for @solar zenith . Give me a minute to catch up

#

Checkout Sessions for one time payments do not generate an invoice. What is it you are trying to achieve here?

noble python
#

they dont? or is there an option for it that we enabled it. if it is not the case we need to send receipts for one time payments as well

trail bridge
noble python
#

Email finalized invoices to customers

#

is enabled for me

#

so this is the correct one

#

i guess

trail bridge
#

Except that checkout won't create an invoice in payment mode

#

I think you want "Email customers about ... successful payments"

noble python
#

yes

#

i think it is good enough

#

i thought that email that is being sent is receipt but that is alright

#

now what i need, that emails to be in correct language

#

now we know for auto generated customers when doing checkout, their language is our stripe accoutns defualt language

#

i want to update customer preferred language before this email is sent

#

trying to understand when this email is exactly sent. Is it too late to update customer language when i get the event: paymentIntent completed