#delgesu1745_api
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/1356310515999178783
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
Do you mean you don't want the user to be redirected to a different URL?
Correct
The form is just saving their payment info for future use and there are other steps of the application process.
Are you only accepting Card payemnt methods, or are you using dynamic payment methods?
Dynamic meaning Link, Apple Pay, Google Pay, Amazon, etc?
At a min we want credit and bank account.
Not sure if bank is dynamic
You can specify redirect: "if_required" when you confirm the Setup Intent
Yeah I saw that but I wasn't sure if I totally understood it.
However, some payment methods, like some banks, require the customer to be taken to another URL. In those cases we use the return_url parameter to send the customer back to your website
So if our flow is that they have a next step to complete in the registration process and we have bank method as an option then I would need to redirect? Because the element is an embeded component on the page, so it doesn't look like they've been taken anywhere else than the page that they're on.
Are you loading the Payment Element inside an <iframe>?
Yes, I think so. I'm following the guide I linked above.
So what happens when you use a redirect payment method in Test mode?
So the test bank account and link the account work and take me back to the page it's embedded on, but when I submit it asked to enter the url to load.
Hi, taking over as my teammate needs to step away. Let me catch up.
If I'm understanding your ask correctly, after you click on 'Submit' from the above video you'd like them to be redirected to a specific page?
If so, you can pass a return_url: https://docs.stripe.com/payments/save-and-reuse?lang=node#charge-saved-payment-method in the confirmParams:
confirmParams: {
return_url: 'https://example.com/order/123/complete',
},
If that is not what you're looking for, can you reword your ask please?
Yeah, no, that's not it. The opposite actually. I'd like to not have to redirect to a specific url, but simply update the components on screen after resolving the saved payment method.
The only way to control this with dynamic payment methods would be by choosing this: https://docs.stripe.com/js/payment_intents/confirm_payment#confirm_payment_intent-options-redirect
If you set redirect: "if_required", then stripe.confirmPayment will only redirect if your user chooses a redirect-based payment method.