arrow_backward Back to blog

Dwolla: An Alternative Payment Processor

Recently when looking for a replacement ACH payment processor we had an opportunity to do a deep dive into Dwolla and were pleasantly surprised! We worked through an initial integration with one of our Rails apps, and in this post, I’ll share how you can do the same.

What is Dwolla?

According to their site:

Dwolla is a payment network that allows any business or person to send, request, and accept money. Unlike the big payment companies that rely on plastic cards and charge hefty fees, Dwolla built their own network that securely connects to your bank account and allows you to move money…

We chose to go with their OAuth + REST API method for integration, but this was one of many possible scenarios. Not only does Dwolla have multiple options for connecting and delivering payment requests, but (as is attractive to any developer) their documentation is clear and concise.

One aspect we’ve avoided in the past with systems like Dwolla, is forcing users to create full accounts prior to gaining access. Dwolla’s new “direct” offering allows users to proceed with an email address, password, and their bank’s website credentials only; saving time, effort and eliminating errors. You can see an example of their form builder here.

Connecting Dwolla to your rails app

Hundreds of people are leveraging the advantages of super simple, secure authentication with OmniAuth in their applications. This authentication route helps simplify login and allows you necessary access to Dwolla permissions.

First, let’s add the two gems in your Gemfile. Note: If you want to handle payments as well as incoming funds, add dwolla-ruby too.

Next, configure omniauth-dwolla by adding the middleware to config/initializers/omniauth.rb and getting a token with scope permissions for full user info access and sending and requesting transactions:

Finally, visit https://uat.dwolla.com (Dwolla’s sandbox which mirrors production) to create a testing account. The sandbox is full-featured, with everything you need in testing; transactions, activity logs, adding funds to test accounts, etc. Once you’ve registered for this test account, you’ll be able to retrieve user information from the Dwolla site when users create an account on the marketplace app. See below:

Before we play with some functions, let’s set the secret and key for the app, located in your registered application panel. Remember to record your pin (shown below) for your reference. The pin ensures security for purchases both from your application and for individual purchasers.

Using the Dwolla API

You should initiate a new Dwolla User client and seed a previously generated access token (see below) every time you want to call the API.

In order to handle transactions (you can try in rails console):

Handle funding sources

Keep in mind, as the seller you can affect funding sources in Dwolla’s admin panel. We’ve found that you often need this to let the buyer update/add their bank information to Dwolla via your marketplace.

There are a multitude of ways to interact with the Dwolla API, and their documentation breaks it down for both developers and non-developers. There are tons more samples like I posted above, but what’s more important is to apply the functions correctly to your marketplace use case. Additional features can be found in their labs.

If you are looking for a payment gateway, I strongly recommend you use Dwolla. From all angles, it’s a complete and smoothly implemented choice. Got any questions? Let us know!

arrow_backBack

New Project Request