#r3d_code

1 messages ¡ Page 1 of 1 (latest)

livid thornBOT
#

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

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

chrome wolf
#

Hello! There's no such thing as a "Contacts object", but there is address information on the Customer and Payment Method objects.

limpid vessel
#

So it is attached to a paymentmethod?

chrome wolf
limpid vessel
#

So what is that?

chrome wolf
#

That's specific to the Address Element on the client side. It's not an object in the API itself, it's only a client-side concept.

limpid vessel
#

Does that mean they are not saved on the server?

#

Because I'm trying to give the customer the ability to edit his Billing address in his dashboard on my website

#

If I cannot retrieve or save this billing address on stripe apart from during a payment that's gonna make things really complicated

chrome wolf
#

Let's back up. Are you following a guide or tutorial? Can you link me to it?

limpid vessel
#

I'm just trying to use Elements to collect the billing address of the customer

#

Using svelte-stripe

chrome wolf
#

We don't really have a guide for this specific use case, but it should be possible by creating an Address Element, having your customer fill it in, then you'd use addressElement.getValue() to get the address info, send it to your server, and from there you'd update the Customer's billing address: https://docs.stripe.com/js/elements_object/get_value_address_element

limpid vessel
#

The elements form does show but no info inside and none gets saved, I just want a way to fetch and save billing addresses

chrome wolf
#

What do you mean by "no info inside"? Are you trying to prefill the Address Element with their existing billing address?

limpid vessel
#

I thought that just using the client_secret the element would already be prefilled with the customer's info

#

I'll use getValue when submitting and save it on my server and use defaultValues to prefill it on load

chrome wolf
#

No, that won't happen. If you're not taking a payment or saving payment details (like card info) you wouldn't use a client secret for this flow as far as I know.