I am passing the account ID retrieved from the connected Stripe account as follows (slightly altered to preserve privacy):
plaidClient.createStripeToken(accessToken, 'acct_3C2QhSG4bc0yBRVY', function(err, res) {
Which returns this response: 'account_id must be a properly formatted, non-empty string'
The Account ID that function is expecting is not your Stripe Account ID, it's the account ID returned from Plaid link. The onSuccess callback for the Plaid link handler will be resolved with two arguments, the first is public_token
and the second is metadata
. The account ID expected here is available on that metadata.account_id
property.
var linkHandler = Plaid.create({
onSuccess: function(public_token, metadata) {
console.log('Customer-selected account ID -> : ' + metadata.account_id);
},
// ...