Processing webhooks: an example scenario

Let’s assume that you have a webhook subscription and Dwolla has just delivered the following payload to your specified endpoint:

Sample Payload
  "id": "fe869b23-097b-4c95-9891-cb59c753a895",
  "resourceId": "ac84655e-8d28-e911-8115-c4a646b43d5b",
  "topic": "customer_transfer_completed",
  "created": "2019-02-04T14:58:45.144Z",
  "_links": {
    "self": {
      "href": ""
    "account": {
      "href": ""
    "resource": {
      "href": ""
    "customer": {
      "href": ""

For illustrative purposes, let’s assume you are using Ruby on Rails with a controller defined to handle the POST request from Dwolla’s servers. Your application logic will look a little something like this:

require 'dwolla_v2'

if params[:topic] == 'customer_transfer_completed'
  transfer = app_token.get (params[:links][:resource][:href])

  transfer._embedded.each do |k, v|
    # Retrieve customer info from your database
    # or from Dwolla here, and then send notifications
elsif params[:topic] == 'another_event'

Let’s recap. From the event we can retrieve the transfer and then take a look at the _links object and retrieve the customers that need to be notified. From here, you can make a call to customers/{id} to retrieve their e-mail addresses (or to your own database) so that you can send your notification message.

That’s it! You’ve learned the basics of webhooks.

Production: Operational

Financial institutions play an important role in the Dwolla network.

Dwolla, Inc. is an agent of Veridian Credit Union and all funds associated with your account in our network are held in one or more pooled accounts at Veridian Credit Union. These funds may not be eligible for share insurance by the National Credit Union Share Insurance Fund. Dwolla, Inc. is the operator of a software platform that communicates user instructions for funds transfers to Veridian Credit Union.