#otaeotay_api

1 messages · Page 1 of 1 (latest)

bold flintBOT
#

👋 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/1217229047382413312

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

limber galeBOT
versed crane
#

Hi there! By "user's address", do you mean the address property on the Customer object?

lyric sequoia
#

Yeah!

versed crane
#

Okay, it looks like if a new customer is created during a Checkout Session (either because it's for subscription mode or if you pass customer_creation: required) and you pass billing_address_collection: required, we'll attach the address that the customer provides as both the PaymentMethod's address and the Customer's address

#

That seems to apply to brand-new Customer objects only though. If you create a Checkout Session for an existing customer and that customer already has customer.address populated, any billing address values provided by the customer in the Session will be attached to the PaymentMethod only

lyric sequoia
versed crane
#

If you want the newly-provided billing address to be used to update the Customer's address, I recommend retrieving the address from the new PaymentMethod then using this to update the customer

lyric sequoia
#

So the customer isn’t created via the checkout session

#

Ahh ok

#

Yeah i just noticed that theyre formatted the same in the response & what the update customer request is asking for

#

Ok thanks!