Node Js Stripe Connect Missing Requested_capabilities: ['card_payments'] Param From Create Account Function
im trying to use stripes node js api to create connect accounts and then allow them to pay for services and receive transfers. Iv read all of stripes current api docs but i cannot add the requested_capabilities:[] param to my function for some reason. im useing the node js stripe api version 7.8.0 with "@types/stripe": "^6.31.20"
https://stripe.com/docs/connect/custom-accounts#requirements
Iv read the stripe docs and even looked into the class file for the function im calling but the param dosent seem to exist.
console.log('Creating stripe account for user ', user);
const customer: Promise<Stripe.accounts.IAccount> =
stripe.accounts.create(
{
type: 'custom',
country: 'US',
email: user.email,
business_type: 'individual',
individual:{
email: user.email,
first_name: user.name.firstName,
last_name: user.name.lastName,
},
tos_acceptance: {
date: Math.floor(Date.now() / 1000),
ip: user.ipAddress
}
}
'You must request at least one of the following capabilities: platform_payments, card_payments, legacy_payments. Please visit https://stripe.com/docs/connect/capabilities-overview to learn more.',
Object literal may only specify known properties, and 'requested_capabilities' does not exist in type 'IAccountCreationOptions'.
Answer
Here's an example of how you pass the requested_capabilities
:
const account = await stripe.accounts.create({
type: 'custom',
country: 'us',
requested_capabilities: ['card_payments']
});
Related Questions
- → Maximum call stack exceeded when instantiating class inside of a module
- → Browserify api: how to pass advanced option to script
- → Node.js Passing object from server.js to external modules?
- → gulp-rename makes copies, but does not replace
- → requiring RX.js in node.js
- → Remove an ObjectId from an array of objectId
- → Can not connect to Redis
- → React: How to publish page on server using React-starter-kit
- → Express - better pattern for passing data between middleware functions
- → Can't get plotly + node.js to stream data coming through POST requests
- → IsGenerator implementation
- → Async/Await not waiting
- → (Socket.io on nodejs) Updating div with mysql data stops without showing error