Creating a customer on an account (white label ACH)


#1

Trying to use the Dwolla_v2 gem for ruby and the documentation is very inconsistent and confusing.

I am trying to use the white label ACH funtionality and I want to add a customer to our account and then add a funding source (bank account) to this users account.

Since its white label, we cannot use OAuth. Which steps should I take and which documentation should I follow specifically?

Thanks!


(Stephen Ausman) #2

Hey Zach,

Sorry for the confusion. There are a few different ways to get OAuth tokens depending on the type of application you’re building. It sounds like you can get away with just generating a token.

  1. Generate a token on the applications page here https://uat.dwolla.com/applications#
  2. Initialize the token in your app:
    token = $dwolla.tokens.new access_token: "..."
  3. Use the token to create a customer:
    customer = token.post "customers", firstName: "John", lastName: "Doe", ...
  4. Create a customer funding source:
    funding_source = token.post "#{customer.headers[:location]}/funding-sources", routingNumber: "222222226", ...

Hopefully that helps. If you have any other questions let us know.

Thanks for the feedback on the docs, we’ll try to do a better job explaining things. Which parts did you find inconsistent/confusing?


#3

Where do I get the Dwolla ID?

for this line:
$dwolla = DwollaV2::Client.new(id: ENV["DWOLLA_ID"], secret: ENV["DWOLLA_SECRET"])


#4

I’ve got 4 types of tokens:

Key
Secret
access token
refresh token

Missing the id.

I’m not sure which token to use where.


#5

In the area where you can generate the tokens/keys etc…

There are too many tokens and keys and things that you can generate and the documentation references some of these but isn’t really specific and there are like 3 gems that I can use to access dwolla.

It would be nice if we could settle on one gem.

The readme on github could benefit from some screenshots that tell you exactly which tokens to use where.


(Stephen Ausman) #6

Thanks Zack,

Good points/suggestions, we’ll work on making these things more clear. The client id is the same as the consumer key found on the applications page.


#7

I’m still getting access denied. I try to generate new tokens, secrets, oauth tokens and refresh tokens, plug them in where you’ve told me and nothing works. Is there any way I can screen share? I have deadlines…


(Stephen Ausman) #8

Yeah feel free to shoot me an email stephen at dwolla.com if you’re still having trouble.

If you’re using the sandbox environment you’ll also need to configure the client to use that:

$dwolla = DwollaV2::Client.new(id: "consumer key", secret: "consumer secret") do |config|
  config.environment = :sandbox
end
token = $dwolla.tokens.new access_token: "access token"

Either that or you may need to go to the edit permissions page for your app and the “Manage Customers” permission if it isn’t already enabled.


#9

I’ve sent you an email and have verified that I have all permissions enabled.