#SC Haw-SetupIntent-Connect
1 messages · Page 1 of 1 (latest)
It is working on your localhost but you get that error where?
Do you have the ID of the SetupIntent that you saw this for?
Sorry, I should've been clear. I got the error when I deploy it to my staging environment, which has the secret key encrypted along with some network policies
Thank you. Checking this out
Hey, apologies for the delay. Things got a bit busy. Testing one more thing and will check this in a minute
So I am not seeing the error you described on the calls for that SetupIntent
Which means that that call to confirm likely was on another account
So you are doing this with connect, have you double checked that Stripe.js is being initialized to the correct account on the client side?
Yes. I can also see that the account ID included as a _stripe_account query param in the call
Hello! When you get the The client_secret provided does not match the client_secret associated with the SetupIntent error message is a network request being made from the browser? If so can you give me the request ID for that network request?
You should be able to find it if you open the dev tools, go to the network tab, and trigger the error.
I wasn't able to find the request ID in my browser but I did find it in my dashboard - req_Uf7cqIhrrXb0QH
Taking a look, hang on...
The client secret being used there is redacted on my end; can you confirm it matches the Setup Intent ID in the URL for that request? The one that ends with 5r5sjq?
Yes, for the ID part it matches the Setup Intent ID
Hm, looking more...
As far as I can tell on our end the client secret provided does not match the Setup Intent you're trying to use it with. Are you sure the complete client secret is being passed in? No extra characters or anything like that?
I can verify that the complete client secret is passed in and matches the secret that I get when I first created the Setup Intent.
One strange thing I noticed is that if I try to retrieve my Setup Intent through subsequent API calls via Postman, it returns the data with client secret as null
Hello again! Can you provide a request ID showing the client secret is null?
Hi, here's one req_3PI39ciGsUhzy5
This is the request for my Postman call but it didn't record the response body req_BWYJko0kSGDBLG
Taking a look, hang on...
That Setup Intent was not created by your platform, so the client secret is not available to you.
Ah, it's probably because I created the setup intent on the connected account?
Yeah. If you created the Setup Intent from your platform using a Connect request you would be able to access the client secret.
But that Setup Intent was created directly by the connected account itself without Connect involved.
I did include a Stripe-Account header in my request, wouldn't that allow me to retrieve the Setup Intent as the connected account?
In my Postman request anyway, not the curl request
Yeah, and that works, but that's not the issue.
The issue is the Setup Intent you fetching was created by the connected account itself, not your platform.
You didn't create it, so you don't get the client secret.
If you used a Connect request with the Stripe-Account header to create the Setup Intent you would be able to see the client secret.