#vell_2x
1 messages · Page 1 of 1 (latest)
const account = await stripe.accounts.create({
type: 'express',
email: email,
business_type: 'company',
}
sending that variable
Okay that looks like you are using our Node SDK. How are you initializing your stripe instance here?
That is generally where you would pass your API key
I have my stripe live key in the stripe variable. I should add my connect api to that?
Would that effect the other call i make using stripe?
If your live key is being used to initialize stripe then that is all you should need.
So I'd double check that your code is saved
And try restarting your server if necessary
I do have a separate Connect accounts API key. I just dont know how to add it to my request
Not sure what that means. If you are creating a Connected Account you would only be using your platform's API key. You would really never be using a Connected Accounts API key regardless, you would just use the Stripe Account header if you are making requests for that account: https://stripe.com/docs/connect/authentication
ok i will double check my secret
i am getting this error
UnhandledPromiseRejectionWarning: Error: You did not provide an API key. You need to provide your API key in the Authorization header, using Bearer auth (e.g. 'Authorization: Bearer YOUR_SECRET_KEY'). See https://stripe.com/docs/api#authentication for details, or we can help at https://support.stripe.com/
Yep so the issue is that your authentication isn't happening properly
So you'll need to check/debug that
can you send me the link to event handlers
My subscriptions are failing in my test mode
I guess so. I am still a little confused about the subscription webhooks. Like which event is triggered when a subscription is successfully renewed
Well the above article talks about that. But you want to listen for customer.subscription.updated for renewals.