V2 sandbox - Getting "Invalid funding source" for transfers


(John Duhamel) #1

Hello,

I get the following error whenever I try to initiate a transfer in the v2 API sandbox:

{“code”:“ValidationError”,“message”:“Validation error(s) present. See embedded errors list for more details.”,"_embedded":{“errors”:[{“code”:“Invalid”,“message”:“Invalid funding source.”,“path”:"/_links/source/href"}]}}

I’ve noticed some other docs are out of date for NodeJS. Could you let me know if there’s anything I’m doing wrong?

Here is my code:

https://gist.github.com/jjduhamel/325994468d178badb2bf

Thanks,

John


Transfer from customer to account - invalid funding source
(Jared Dellitt) #2

Hey @John_Duhamel1, what is that status on the funding source you’re trying to use? Only verified banks (and balances for verified customers) can be used to send.


(John Duhamel) #3

Hey @jared. Thanks for the quick response. I added micro-deposit verification based you your response, which seems to have had an effect. Now, I’m getting this error. I haven’t had a chance to dig into this one yet.

{“code”:“ValidationError”,“message”:“Validation error(s) present. See embedded errors list for more details.”,"_embedded":{“errors”:[{“code”:“Invalid”,“message”:“Receiver cannot be the owner of the source funding source.”,“path”:"/_links/destination/href"}]}}

I was under the impression that I could use Plaid for IAV without also needing to verify the account on Dwolla. The docs seem to indicate that either the source or destination account need to be verified. So long as the customer is verified, I thought I could initiate transfers without using Dwolla IAV or Microdeposits. Could you clarify whether we need to run micro-deposit verification on each funding source, if we’re also supplying enough information to verify the customer?

Thanks,

John


(Jared Dellitt) #4

@John_Duhamel1, yes - you can use something like Plaid for IAV, but we’ll need to mark your account as available to do so in the Sandbox environment. Once that’s enabled, whenever you add a funding source via the API, it will automatically be verified. I’ll send you a message to get more details about your Sandbox app.

As for your error message, it looks like you might be trying to send money to the same customer that the funding source was added to. You’ll need to send to a different customer or the account owning the customer. Also remember that one party in the transaction must be CIP verified (even if the source funding source is verified).

Let me know if that helps or you have any other questions!


(Taylor Burmeister) #5

@jared does this mean there is no way to transfer funds between a single user’s funding sources, e.g. to transfer money from their checking account to their savings account?


(Spencer Hunter) #6

@tburmeis, This is possible, however two transfers will need to be initiated in this scenario: 1.) A transfer from the user’s checking account to the user’s Dwolla balance. 2.) A transfer from the user’s balance to the savings account.


#7

I’m getting this error too. The sandbox account says it is verified (13d5d138-7801-4a02-8771-06a4ece2ab14) and has $1,000 deposited, so I’m not sure what else it needs to be valid.


(Spencer Hunter) #8

@JDDunn9, The funding source id: 13d5d138-7801-4a02-8771-06a4ece2ab14 looks to be a bank account that is attached to the Dwolla Account 827c8ea9-91bc-4b5d-81ce-cebc8828182b. Where are you trying to send to and from? What does your request body look like?


#9

The function is:

exports.transfer = function(token, fundingSourceId, recipientId, amount) {
    return new Promise(function(resolve, reject) {
        var transferData = {
            _links: {
                source: {
                    href: 'https://api-uat.dwolla.com/funding-sources/' + fundingSourceId
                },
                destination: {
                    href: 'https://api-uat.dwolla.com/accounts/' + recipientId
                }
            },
            amount: {
                currency: 'USD',
                value: amount
            }
        };

        // Make a transfer
        token.post('transfers', transferData)
        .then(resolve).catch(reject);
    });
};

fundingSourceId = 13d5d138-7801-4a02-8771-06a4ece2ab14
recipientId = 13d5d138-7801-4a02-8771-06a4ece2ab14


(Spencer Hunter) #10

Thanks for the details @JDDunn9, It looks the two Ids are the same which both specify a funding source id that belongs to the account 827c8ea9-91bc-4b5d-81ce-cebc8828182b. Did you by chance accidentally paste in the wrong recipientId?


#11

Yeah, pasted wrong one. recipientId is f8692886-abba-427c-93fb-ee0b4fdf62cf


(Spencer Hunter) #12

@JDDunn9, Can you reply back with the error response body? I was just able to send to the account specified as your destination and your request body looks okay otherwise.


#13

Response body:

{ 
    code: 'ValidationError',
    message: 'Validation error(s) present. See embedded errors list for more details.',
    _embedded: { 
        errors: [ { 
           code: 'Invalid',
           message: 'Invalid funding source.',
           path: '/_links/source/href' } ] } }

(SnapExit) #14

Hello. I have the same problem. My sandbox account_id = “e55e0eae-e3ae-43e3-89ac-277fd111a58c”.

I got funding-source = “https://api-uat.dwolla.com/funding-sources/328054bb-f336-45bf-af11-f106fd35819a through account_url and trying to initiate the payment with request body:

_links: {
                source: {
                    href: 'https://api-uat.dwolla.com/funding-sources/' + '328054bb-f336-45bf-af11-f106fd35819a'
                },
                destination: {
                    href: 'https://api-uat.dwolla.com/accounts/' + '12425a9a-fb13-40f5-ac16-728a516d56fe'
                }
            },
            amount: {
                currency: 'USD',
                value: "1.0"
            }

Response gives body:

{"code"=>"ValidationError", "message"=>"Validation error(s) present. See embedded errors list for more details.", "_embedded"=>{"errors"=>[{"code"=>"Invalid", "message"=>"Invalid funding source.", "path"=>"/_links/source/href", "_links"=>{}}]}}


(Spencer Hunter) #15

It looks like the funding source you are attempting to send from has been removed. If you do a GET to https://api-uat.dwolla.com/funding-sources/328054bb-f336-45bf-af11-f106fd35819a you should see the removed property set to true.


(SnapExit) #16

Yes, you are right. I didn’t notice. Thank you very much!