Language

Create a webhook subscription

Each application can have multiple subscriptions associated to it. While one subscription is sufficient, you can create as many as you want for redundancy.

To make the following request, we need to use the access_token we just previously obtained. Security considerations:

Your webhook endpoint should only be accessible over TLS (https). Your subscription should include a random, secret key, only known by your application. This secret key should be securely stored and used later when validating the authenticity of the webhook request from Dwolla.

subscription = DwollaSwagger::WebhooksubscriptionsApi.create({:body => {
  :url => "http://myawesomeapplication.com/destination",
  :secret => "your webhook secret"
}})

p subscription # => https://api-uat.dwolla.com/webhook-subscriptions/5af4c10a-f6de-4ac8-840d-42cb65454216
POST https://api-uat.dwolla.com/webhook-subscriptions
Accept: application/vnd.dwolla.v1.hal+json
Content-Type: application/vnd.dwolla.v1.hal+json
Authorization: Bearer 0Sn0W6kzNicvoWhDbQcVSKLRUpGjIdlPSEYyrHqrDDoRnQwE7Q
{
    "url": "http://myapplication.com/webhooks",
    "secret": "sshhhhhh"
}
// No example for this language yet.
webhook_api = dwollaswagger.WebhooksubscriptionsApi(client)
subscription = webhook_api.create({
    "url": "http://myapplication.com/webhooks",
    "secret": "sshhhhhh"
})

print(subscription) # => https://api-uat.dwolla.com/webhook-subscriptions/5af4c10a-f6de-4ac8-840d-42cb65454216
<?php
$webhookApi = new DwollaSwagger\WebhooksubscriptionsApi($apiClient);
$subscription = $webhookApi->create(array (
  'url' => 'http://myapplication.com/webhooks',
  'secret' => 'sshhhhhh',
));

print($subscription); # => https://api-uat.dwolla.com/webhook-subscriptions/5af4c10a-f6de-4ac8-840d-42cb65454216
?>

You can retrieve your newly created subscription by its resource location:

retrieved = DwollaSwagger::WebhooksubscriptionApi.id(subscription)

p retrieved.created # => 2015-10-28T16:20:47+00:00
Schema:

{
  "_links": {
    "self": {
      "href": "https://api-uat.dwolla.com/webhook-subscriptions/077dfffb-4852-412f-96b6-0fe668066589"
    },
    "webhooks": {
      "href": "https://api-uat.dwolla.com/webhook-subscriptions/077dfffb-4852-412f-96b6-0fe668066589/webhooks"
    }
  },
  "id": "077dfffb-4852-412f-96b6-0fe668066589",
  "url": "http://myapplication.com/webhooks",
  "created": "2015-10-28T16:20:47+00:00"
}
No example for this language yet.
webhook_api = dwollaswagger.WebhooksubscriptionsApi(client)
retrieved = webhook_api.id(subscription)

print(retrieved.created) # => 2015-10-28T16:20:47+00:00
<?php
$webhookApi = new DwollaSwagger\WebhooksubscriptionsApi($apiClient);
$retrieved = $webhookApi->id(subscription);

print($retrieved); # => 2015-10-28T16:20:47+00:00
?>
Financial institutions play an important role in the Dwolla network.

Dwolla, Inc. is an agent of Veridian Credit Union and Compass Bank and all funds associated with your account in the Dwolla network are held in pooled accounts at Veridian Credit Union and Compass Bank. These funds are not eligible for individual insurance, including FDIC insurance and 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 and Compass Bank.