#fwdawid_error
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/1440644264458584177
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Full error:
console.js:36 IntegrationError: Invalid value for paymentRequest(): setupFutureUsage should be one of the following strings: off_session, on_session. You specified: null.
at le (v3/:1:248505)
at de (v3/:1:248584)
at new t (v3/:1:886016)
at Ao (v3/:1:377291)
at Oo (v3/:1:381410)
at ta (v3/:1:398969)
at aa (v3/:1:403850)
at us (v3/:1:460357)
at new t (v3/:1:467466)
at t.<anonymous> (v3/:1:509893)
at t.create (v3/:1:94567)
at Object.initializePaymentElement (index.js:1:9438)
at index.js:115:4633
react-dom.production.min.js:127 Uncaught IntegrationError: Invalid value for paymentRequest(): setupFutureUsage should be one of the following strings: off_session, on_session. You specified: null.
at le (v3/:1:248505)
at de (v3/:1:248584)
at new t (v3/:1:886016)
at Ao (v3/:1:377291)
at Oo (v3/:1:381410)
at ta (v3/:1:398969)
at aa (v3/:1:403850)
at us (v3/:1:460357)
at new t (v3/:1:467466)
at t.<anonymous> (v3/:1:509893)
at t.create (v3/:1:94567)
at Object.initializePaymentElement (index.js:1:9438)
at index.js:115:4633
helpers.js:115 Uncaught TypeError: Cannot read properties of undefined (reading 'hpm')
at WCN.start (recaptcha__en.js:1237:393)
at recaptcha__en.js:397:31
After changing to on_session
{
"error": {
"message": "A setup_future_usage value of on_session cannot be used with one or more of the payment method types active on this PaymentIntent. If you're using dynamic payment methods, please remove setup_future_usage and try again. Otherwise, please remove setup_future_usage or remove these types from payment_method_types: [link].",
"param": "deferred_intent.payment_method_types",
"type": "invalid_request_error"
}
}
Can you share the code you're using that throws this error?
const elements = instance.elements({
// @ts-ignore this is not typed in @types/stripe-v3
mode: 'payment',
locale: 'en',
currency: paymentConfig.amount?.currency.toLowerCase(),
paymentMethodTypes: paymentConfig.paymentMethods,
amount: paymentConfig.amount?.value
? formatStripeAmount(paymentConfig.amount)
: PLACEHOLDER_AMOUNT,
setupFutureUsage: paymentConfig.setupFutureUsage ?? undefined,
appearance,
loader: 'never',
fonts: getFonts(theme),
customPaymentMethods,
})
it after we added fix ?? undefined
instance = Stripe(apiKey, { locale: 'en', apiVersion: '2025-02-24.acacia' })
Is there a specific ask here?
Yes, we want to understand the specific cause of this issue
We saw no changes in Stripe changelog and it suddenly broke during our peak hours and no new versions were released.
We also want to make sure that we are able to prevent it in future
I'd recommend writing in to our team and we can look to see what, if anything, changed at our end: https://support.stripe.com/contact/email?topic=api_integration
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
can I just share this discord thread? or should write it from scratch?
I'd include as much context as possible in the message yes
ok, thank you!