Transfer API Quick Start?

(Tim) #1

Is there a Transfer quick start for PHP anywhere?

Unless I’m looking in the wrong places, (and I’ve been digging around for a couple hours) I can’t find anything that makes any sense on how to get started. The API documentation is fragmented; show a piece of code here and a piece of code there, click this link to open a new browser window and see another piece of code with a terminal CURL command and then try to figure out how they all go together. It’s like building a jigsaw puzzle of a farmhouse without a picture of the farmhouse to use as reference. Very frustrating!

I’d be grateful if anyone has any code they could post as a way to get started.


(Tim) #2

I can’t even get Dwolla’s sample code to work.

Take this for example. I copied this PHP code from


DwollaSwagger\Configuration::$auth_token = 'GnlMMOlLLTTwRRC44gGPkjfsVbVtwzkptDVdIB0fwGwLnV481N';

        $apiClient = new DwollaSwagger\ApiClient("");

        $transfer_request = array (
          '_links' =>
          array (
            'source' =>
            array (
              'href' => '',
            'destination' =>
            array (
              'href' => '',
          'amount' =>
          array (
            'currency' => 'USD',
            'value' => '9.00',

        $transferApi = new DwollaSwagger\TransfersApi($apiClient);

        $myAccount = $transferApi->create($transfer_request);

Pasted it into my file, saved, loaded it into a browser and WHAM!

Fatal error: Uncaught Error: Access to undeclared static property: DwollaSwagger\Configuration::$auth_token

so I comment out that line and WHAM!

Fatal error: Uncaught DwollaSwagger\ApiException: [401] Error connecting to the API (

Also, notice how on the last line it’s trying to print a variable that wasn’t created?

How is anybody getting anything done with this documentation?

(Spencer Hunter) #3

Hi @ssminnow, the PHP SDK for our latest API (v2) doesn’t yet contain support for OAuth which is primarily what you’ll be integrating with if you’re wanting to use Dwolla in a co-branded way with Transfer. We’re actually looking into rewriting a new client library for PHP as the one we released awhile back (dwolla-swagger-php) is outdated and doesn’t offer that great of a developer experience. That being said, If you provide additional detail on how you’re looking to incorporate Dwolla into your app, I’d be happy to assist in providing some sample code for getting started. :slight_smile:

(Tim) #4

Hi Spencer,

I’m not looking to do anything fancy. I was thinking of doing an on-demand payout, where a user could request a payout when they reach a certain dollar amount, and then doing mass payouts - either nightly or every two weeks - for users who have reached a certain dollar amount.

I’m thinking nightly because it would be easier on all systems if the batches are smaller. I’m just getting started and don’t know very much about this, so I’ll leave it up to your expertise to guide me.


EDIT: I was originally thinking of doing this using the Access API instead of Transfer because it seems like it would be easier on my users if they didn’t have to create a Dwolla account at first. Or am I misunderstanding how this works? Is Transfer better? I don’t really know too much about how each service works, I can’t get an phone appointment with a sales person for at least a week to fully understand how this all works.

(Tim) #5


(Antonio David) #6

Change $auth_token to $access_token, and change $xfer to $myAccount, and you will see a result similar to the comment after print($xfer);

Hope this helps!

(Antonio David) #7

Update 1hr later – Continuing on, I’ve been able to use the sandbox to create a Verified Customer and add a Verified Bank Account. I have to say, it is a pretty awesome system and I hope no one is discouraged from using Dwolla.

Just make the adjustments to the code I mentioned above and you’ll be on your way to processing ACH payments.

(Cory Anderson) #8

(Cory Anderson) #9

(Cory Anderson) #10