#thejohndonner_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/1359840640598278254
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, let me help you with this.
The Payment Intent needs to be configured to use the same parameters as Stripe Elements, specifically setup_future_usage.
Hey Vanya, yes, but when we include "setup_future_usage": "offline" in the confirmPayment request from the frontend, we receive the error:
stripe.confirmPayment(): do not pass setup_future_usage at confirm time. Instead, pass setup_future_usage when the PaymentIntent is created.
We are trying like this:
const payload = await stripe.confirmPayment({
elements,
clientSecret,
confirmParams: {
return_url: "",
setup_future_usage: "offline"
},
redirect: "if_required",
})
But maybe this is not what the first error is implying
The answer is in the error message:
do not pass setup_future_usage at confirm time. Instead, pass setup_future_usage when the PaymentIntent is created.