How to make a basic transfer to a user?


(Pradhanr03) #1

I’m trying to get the customer destination link and customer ID. And when I do create a customer to get that customer destination link and customer ID. I get this “Unhandled rejection (<{“status”:401,“headers”:{”_headers":{"…>, no stack trace)"" error. Also, am i supposed to be using dwolla-v2 or the swagger-client node modules? I’m using the dwolla-v2 node module currently. Does it matter? Whats the difference between the two?

This is what i did

"
var dwolla = require(‘dwolla-v2’);

var client = new dwolla.Client({
id: “api key”,
secret: “api secret”,
usePromise: true
});
// # generate a token on dwolla.com/applications
var accountToken = new client.Token({
access_token: “access token”
});

var requestBody = {
firstName: ‘Jane’,
lastName: ‘Doe’,
email: ‘jane@gmail.com’,
ipAddress: ‘99.99.99.99’
};

accountToken
.post(‘customers’, requestBody)
.then(function(res) {
console.log(res.headers.get(‘location’)); // => ‘https://api-uat.dwolla.com/customers/FC451A7A-AE30-4404-AB95-E3553FCD733F
});"


(Cory Anderson) #2

(Cory Anderson) #3

(Cory Anderson) #4