#op_paymentelement-customerbalance

1 messages ¡ Page 1 of 1 (latest)

proper heartBOT
#

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

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

earnest pivot
#

When you set up the payment element are you setting redirect to if_required?

proper heartBOT
queen pine
#

i just tried to set it to if_required but it still shows the popup

#

like this
const { error } = await this.stripe.confirmPayment({
elements,
confirmParams: {
return_url: this.processPaymentUrlValue
},
redirect: 'if_required'
})

#

there is no redirect anyome when closing the popup

fresh quail
#

op_paymentelement-customerbalance

#

@queen pine that's not something we support today with PaymentElement. It will always show that modal. What you would need to do here is build your own UI for picking Bank Transfer as an option (the customer_balance) PaymentMethod. When they pick this you would handle showing the details yourself by calling the Confirm PaymentIntent API (https://docs.stripe.com/api/payment_intents/confirm) server-side and looking at the details inside next_action for example

queen pine
#

ok thats not easy as i can not create a ui for card - right?

fresh quail
#

Correct, it's going to be a biiiiit annoying unfortunately. You could use PaymentElement specifically for just card and then have your own UI to render the choice of "do you want card or bank transfer?" and based on what they pick you either show PaymentElement (card) or you show the bank details

queen pine
#

alright - thanks for help!