#Cheqo
1 messages · Page 1 of 1 (latest)
Hi
return_urlis the url your customer will be redirected when the payment is completed (if there is a 3DS redirection for example)
If you want you can make it optional and only if required:
https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-redirect
so I can simply set redirect to this:
const { error, paymentIntent } = await stripe.confirmPayment({
//`Elements` instance that was used to create the Payment Element
elements,
redirect: 'if_required',
confirmParams: {
return_url: 'http://localhost:3000/test-return'
}
});
and then listen to paymentIntent status on the same page, so its only going to be redirected when absolutely necessary?
Yes
Awesome, Thank you
Welcome!
✅