#op_paymentelement-customerbalance
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/1298670589476868140
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
When you set up the payment element are you setting redirect to if_required?
My apologies, that parameter is part of the confirm call not the element setup https://docs.stripe.com/js/payment_intents/confirm_payment
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
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
ok thats not easy as i can not create a ui for card - right?
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
alright - thanks for help!