#gorleg
1 messages ยท Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- gorleg, 4 days ago, 22 messages
Hi there ๐ if you're using on_behalf_of with a deferred intents flow, then you will also need to specify onBehalfOf while initializing Stripe.js so that it aligns with the Payment Intent you create from your server:
https://stripe.com/docs/js/elements_object/create_without_intent#stripe_elements_no_intent-options-onBehalfOf
Do you know if there's a way to do this using the react-stripe-js package? I've tried setting it in the options param for the <Elements> component, but it errors out saying no overload contains onBehalfOf
(similar issue when trying to update the elements, a la elements.update({ onBehalfOf: proId }))
Hm, not sure offhand, let me see if I can find that.
I'm pretty sure you'll want to set it in your options variable, that is being passed into this line:
<Elements stripe={stripePromise} options={options}>
Just making sure I'm understanding, is it our provided type support that looks like it's leading to the error about onBehalfOf not being supported?
If so, can you confirm what version of react-stripe-js and stripe-js you're using in your project?
sure one sec
"@stripe/react-stripe-js": "^2.1.0",
"@stripe/stripe-js": "^1.54.0",
Ah, I think that's the problem, looks like the definition for onBehalfOf was added in version 2.1.0 of stripe-js:
https://github.com/stripe/stripe-js/releases/tag/v2.1.0
I would suggest pulling in a newer version of stripe-js and see if that resolves this.
ah gotcha, that makes a ton of sense