#deepakkumarwizniche_67815
1 messages · Page 1 of 1 (latest)
await this.stripeObj.confirmSetup(this.clientSecret, confirmParams)
What's wrong here?
Hi are you getting this error from a client-side call? Here's the expected params: https://stripe.com/docs/js/setup_intents/confirm_setup
Well in the line you showed me above, you pass two params
Not 1 object which is what's expected
Yeah you should pass in an object like what's done in the example I linked
Objects are wrapped with {} in javascript
I am
ohh
let confirmParams = {
payment_method: {
card: this.cardNumber,
billing_details: {
name: this.customerData.first_name,
},
},
};
let options = {
handleActions: false,
};
const cardSetup = await this.stripeObj.confirmSetup([this.clientSecret, confirmParams, options]);
look
That's also wrong
how to fix it
ohh
romise) IntegrationError: Invalid value for stripe.confirmSetup(): confirmParams.payment_method should be a string. You specified: [object Object].
const cardSetup = await this.stripeObj.confirmSetup({clientID, confirmParams, options});
Now this
What guide are you following?
You can see which params to pass here: https://stripe.com/docs/js/setup_intents/confirm_setup
You're passing things that aren't even in the the api spec
message
:
"No such setupintent: 'seti_1NrnnVRQrfWSZuABrgYV28Sn'" Now it gives this error
Setup intent is for the connect user
how to do that?
Since you used the stripe account header when creating the setupintent, you also need to pass it when initializing elements: https://stripe.com/docs/connect/authentication#adding-the-connected-account-id-to-a-client-side-application