I am using stripe in node.js.
I need to create a stripe token with bank details. For that I am using the below code which is given in the stripe documentation:
stripe.createToken('bank_account', {
country: 'US',
currency: 'usd',
routing_number: '110000000',
account_number: '000123456789',
account_holder_name: 'Jenny Rosen',
account_holder_type: 'individual',
}).then(function(result) {
console.log("result", result);
});
But I am getting this error, "stripe.createToken() is not a function".
I have also tried "stripe.tokens.create({ bank_account: {})" but it is not giving the token "account".
Need someone's valuable help.