#thejohndonner_code

1 messages ¡ Page 1 of 1 (latest)

wheat roseBOT
#

👋 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.

hybrid condor
#

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.

quick river
#

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

hybrid condor
#

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.

wheat roseBOT