Plaid Link Dwolla Integration

640 views Asked by At

I'd like to integrate Plaid Link with Dwolla and get a processor token in return, but am having a lot of trouble. I've had no problem integrating Plaid Link + Stripe in Node, but have had a heck of a time integrating it with Dwolla. In Node, you simply use the plaid public token and account id and exchange it for a stripe processor token like this:

plaidClient.createStripeToken(access_token, account_id, function(err, res) {
    if(err) {
        console.log(err)
    } else {                                           
        processor_token = res.stripe_bank_account_token;                                     
    }
});

I tried the same for getting a Dwolla processor token but always get 'TypeError: plaidClient.createDwollaToken is not a function':

plaidClient.createDwollaToken(access_token, account_id, function(err, res) {
    if (err) {
        console.log(err);
    } else {
        console.log('dwolla processor token response: ' + res);
    }
});

I'd really appreciate a point in the right direction or any help. It seems like there is a lot of help and support for Stripe, but not much for Dwolla whatsoever and it seems like a much harder API to integrate thus far.

1

There are 1 answers

0
Allison Schambers On

I've figured this out after taking another hard look at this document:

https://github.com/plaid/plaid-node

After looking at this document, I noticed the following:

// createProcessorToken(String, String, String, Function)
plaidClient.createProcessorToken(access_token, account_id, processor, cb);

I thought about it for a while, and started to google some more/search github for plaidClient.createProcessorToken and found this github repository:

https://github.com/Threde/stripe-plaid-ui/blob/16f45bef56b84ed140543ea9ef3b84db1cc36359/index.js

You will see this:

plaidClient.createProcessorToken(ACCESS_TOKEN, ACCOUNT_ID, 'stripe', function(error, tokenResponse){

which led me to try this and it actually worked.. if only the documentation was more complete, I don't know how people figure these things out otherwise, just trial and error and hope something works eventually?

plaidClient.createProcessorToken(access_token, account_id, 'dwolla', function(err, res) {
    if(err) {
        console.log('error: ' + err);
    } else {
        console.log('res: ' + res.processor_token);
    }
});

If anyone still has advice on how to better approach problems like this and figure them out quicker, I'd appreciate it tremendously. I feel like I'm doing something wrong, and most people know how to figure things like this out rather quickly, or without much trouble likes this is obvious to them or something.