Trying to used managed accounts for payouts. Basically a user is charged and the money is sent to the managed account instead of the platform account. I am using "sharing customers" I am using the code at the bottom of this link https://stripe.com/docs/connect/shared-customers. After retrieving the token I try to do a single charge I get an error saying "Card information not found", but I am passing the cardId when creating the token
Error: message: "Could not find payment information"
Stripe.tokens.create(
{ customer: request.params.customerId, card: request.params.cardId },
{ stripe_account: 'acct_xyz' }, // id of the connected account
function(err, token) {
Stripe.charges.create(
{
amount: 1000, // amount in cents
currency: "usd",
source: token,
description: "Example charge",
application_fee: 123 // amount in cents
},
function(err, charge) {
console.log(err);
});
});