#nico_code
1 messages ยท Page 1 of 1 (latest)
๐ 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.
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
Yeah, but I cant add an shipping address element and an billing address element.
It doesnt let me
Yep, doesn't work today I'm afraid ๐ฆ
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?
What do you mean by 'does not allow for the creation of invoices'?
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?
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
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
Agreed, it's not great. But something we hear often and is top of mind for the team
Sure
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?
well PaymentIntents are a lot more low-level than that. If you want to retry them, you would build your own page that presents a button to do so, and then you can call functions such as https://docs.stripe.com/js/payment_intents/confirm_card_payment#stripe_confirm_card_payment-existing in stripe.js
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?
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
Ok, this sounds very helpful. What about payments that are asynchronous? If a Payment is pending and I call https://docs.stripe.com/js/payment_intents/confirm_paypal_payment what would happen?
you'd get an error about the PaymentIntent not being in a state where it's possible to confirm it, I believe
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?