Application as funding source?


(Tim Bartley) #1

Hi,

I’m new to Dwolla so maybe I’ve just missed something obvious.

Our model will be one where we receive payment for our service and occasionally need to send refunds back to our users. So transfers are just between us and our users - never user to user. Ours will be a white label integration.

It’s not clear to me how I can initiate such transfers i.e. how do I reference our application as a destination? as a source? Do I need to only use fees i.e. $0 amounts but full amount in the fee? If fees are the way to go, how do I refund a fee?

Thanks,

Tim


(Spencer Hunter) #2

@tbartley, Transfers can occur between two accounts but not between a user account and an application. It’s important to note that an application belongs to a Dwolla account. Using our Access API, users on your application can be created as Customers and managed by your Partner Dwolla account via the Dwolla API.

If your application involves receiving money from users or paying out users then the funds flow would be between your Account and the Customer accounts you create. If you’re looking at the API docs, then the Unverified Customer type would be what you’d want to create to represent users sending and receiving funds on your application.

Customer -> Account (Pay-ins)
Account -> Customer (Payouts)

Step 1: Create the Customer. Object that represents user sending or receiving funds.
Step 2: Attach a funding source (Bank account) to the Customer. Funding sources are relational to Customers or Accounts so they must be added after the Customer is created.
Step 3: Transfer funds from the fund source or to the funding source that belongs to the Customer. Again, Transfers are relational to Customers so they must happen after the previous two steps.

How do you reference the source and destination for a transfer? Through the use of links which represent the funding source funds are being sent from, and the funding source funds are being sent to! The source link can be found by fetching your Customer’s list of funding source (unless this FS id is stored after it’s initially created). Mentioned in step 2 above. The desintation link can be found by retrieving the list of funding sources attached to your Dwolla account. They will both look like this: https://api.dwolla.com/funding-sources/692486f8-29f6-4516-a6a5-c69fd2ce854c

Hope this helps, please let us know if you have any follow up questions!


(Tim Bartley) #3

Thanks @spencer, that’s mostly cleared it up. The one missing piece for me is I’m not sure how to perform the Account -> Customer transfer. The documentation for transfers only lists funding source as an acceptable source for the transfer. What funding source do I use to represent our Account as a source for an outbound transfer?

Thanks again,

Tim


(Spencer Hunter) #4

After obtaining an access token, you can fetch your accounts list of funding sources. See below for an example of the request and response. Your account url can be found by calling the root of the API with your access token.

Request:

GET https://api-uat.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254/funding-sources?removed=false
Accept: application/vnd.dwolla.v1.hal+json
Authorization: Bearer {{accessToken}}

Response:

{
  "_links": {
    "self": {
      "href": "https://api-uat.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254/funding-sources?removed=false",
      "type": "application/vnd.dwolla.v1.hal+json",
      "resource-type": "funding-source"
    }
  },
  "_embedded": {
    "funding-sources": [
      {
        "_links": {
          "self": {
            "href": "https://api-uat.dwolla.com/funding-sources/707177c3-bf15-4e7e-b37c-55c3898d9bf4",
            "type": "application/vnd.dwolla.v1.hal+json",
            "resource-type": "funding-source"
          },
          "account": {
            "href": "https://api-uat.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254",
            "type": "application/vnd.dwolla.v1.hal+json",
            "resource-type": "account"
          }
        },
        "id": "707177c3-bf15-4e7e-b37c-55c3898d9bf4",
        "status": "verified",
        "type": "bank",
        "name": "First Midwestern Bank",
        "created": "2014-07-09T20:39:37.000Z",
        "removed": false,
        "channels": [
          "ach"
        ]
      },
      {
        "_links": {
          "self": {
            "href": "https://api-uat.dwolla.com/funding-sources/b268f6b9-db3b-4ecc-83a2-8823a53ec8b7",
            "type": "application/vnd.dwolla.v1.hal+json",
            "resource-type": "funding-source"
          },
          "account": {
            "href": "https://api-uat.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254",
            "type": "application/vnd.dwolla.v1.hal+json",
            "resource-type": "account"
          },
          "with-available-balance": {
            "href": "https://api-uat.dwolla.com/funding-sources/b268f6b9-db3b-4ecc-83a2-8823a53ec8b7",
            "type": "application/vnd.dwolla.v1.hal+json",
            "resource-type": "funding-source"
          },
          "balance": {
            "href": "https://api-uat.dwolla.com/funding-sources/b268f6b9-db3b-4ecc-83a2-8823a53ec8b7/balance",
            "type": "application/vnd.dwolla.v1.hal+json",
            "resource-type": "balance"
          }
        },
        "id": "b268f6b9-db3b-4ecc-83a2-8823a53ec8b7",
        "status": "verified",
        "type": "balance",
        "name": "Balance",
        "created": "2014-07-09T20:39:33.000Z",
        "removed": false,
        "channels": []
      }
    ]
  }
}

In the example above you can see that I have two funding sources attached to my Dwolla account. One funding source is of type balance and one is of type bank. If you’re wanting to pay from your Dwolla account balance then specify https://api-uat.dwolla.com/funding-sources/b268f6b9-db3b-4ecc-83a2-8823a53ec8b7 as your source href. If you want to payout directly from an attached bank account, specify https://api-uat.dwolla.com/funding-sources/707177c3-bf15-4e7e-b37c-55c3898d9bf4 as your source href.


(Tim Bartley) #5

Got it. Thanks @spencer