'StripeInvalidRequestError: You can only create new accounts if you've signed up for Connect
When trying to test Stripe Connect Api, I get the following error:
'StripeInvalidRequestError: You can only create new accounts if you've signed up for Connect'
I have signed up for an account and I use my personal Secret Key so i don't know why its not letting me test this feature. Below is the code for the post request.
router.post('/api/post/create-stripe-account', async (req,res) => {
const data = req.body;
try{
var account = await stripe.accounts.create({
country: 'US',
type: 'custom',
requested_capabilities: ['card_payments', 'transfers'],
});
res.json(account)
}catch(error){
console.log(error)
}
})
Link to documentation that I followed: Using Connect with Custom Accounts
Any thoughts why stripe doesn't think I have signed up? I have used this secret key successfully with sending payments by card but stripe connect doesn't seem to like it. Thanks!
Solution 1:[1]
You should be able to create new accounts in test mode using your test API key (starting with sk_test_
). Can you confirm that's the key you're using on your server?
The error you're getting usually indicates your Connect platform application is not complete and you're trying to create an account in live mode (using your sk_live_
key). In order to create accounts in live mode you need to complete your platform profile in the Stripe Dashboard.
Solution 2:[2]
I followed these steps from stripe docs and it works.
Solution 3:[3]
I resolved the issue based on Justin Michael's comment
Do you have Connect enabled in test mode here? dashboard.stripe.com/test/connect/accounts/overview Does anything seem amiss in your Connect settings here? dashboard.stripe.com/test/settings/applications – Justin Michael Jul 9, 2020 at 23:31
Click on get started only then you can get access to create function of stripe.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Justin Michael |
Solution 2 | dany952 |
Solution 3 | cigien |