#nico_code

1 messages ยท Page 1 of 1 (latest)

jagged echoBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

open sphinx
#

If you want to collect the full billing address then you'd need to use the Address Element in billing mode

#

Otherwise, we optimise for the minimal fields required for the selected payment method

winged dove
#

Yeah, but I cant add an shipping address element and an billing address element.

#

It doesnt let me

open sphinx
#

Yep, doesn't work today I'm afraid ๐Ÿ˜ฆ

winged dove
#

But how does this work for others? I mean just collecting the country on an alternate billing address does not allow for the creation of invoices, therefore rendering this pretty useless.

#

Or does it collect an billing address from the payment provider somehow?

open sphinx
#

What do you mean by 'does not allow for the creation of invoices'?

winged dove
#

Well to create invoices for the purchases of my customers, I need the billing address. If a customer unchecks the "I use the same address for billing" checkbox, but stripe does not provide a way to enter an alternate billing address, what address should I put on the invoice?

open sphinx
#

Got it. Yep, there's really not an ideal way to collect both billing and shipping addresses when they differ with Elements today. I think you can mount another AddressElement in a separate Elements group, and then use the event to collect the values as needed

#

Hacky, but only workaround I can think of

#

Pain point for sure

winged dove
#

Seems not really optimal, but should work probably. I will try that. Thanks!

#

Can I ask another question? Wouldnt be about elements tho, but the payment intent

open sphinx
#

Agreed, it's not great. But something we hear often and is top of mind for the team

tender gateBOT
winged dove
#

When a Payment is failing and stripe is redirecting to our website, I would like to present the user with a "Retry payment" button. Is there a way to generate a payment link from the payment intent after it failed?

low gorge
winged dove
#

Well, we use the stripe elements and are getting a payment intent id in the SearchParams. I thought there might be a way, using this id, to create a link to the same payment option the user used (for example paypal).
Would your approach use the same paymentintent or create a new one?

low gorge
#

it would use the ID you pass to the function

#

so if you are getting an ID from the URL and passing it to that function, it will confirm that PaymentIntent

winged dove
low gorge
#

you'd get an error about the PaymentIntent not being in a state where it's possible to confirm it, I believe

winged dove
#

Ok, this sounds good. I will try it out. Thanks a lot!

#

Oh, one more thing. It is not possible to use the payment element for a failed payment intent again, is it?

low gorge
#

it is

#

if the payment failed the PaymentIntent goes back to the requires_payment_method state and you can just start over

winged dove
#

Nice!

#

This will make our lives a lot easier ๐Ÿ˜„