Create a webhook subscription - Dwolla Developer Portal

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

POST

https://api.dwolla.comhttps://api-sandbox.dwolla.com

/webhook-subscriptions

cURL

POST https://api-sandbox.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"
}
// Using dwolla-v2 - https://github.com/Dwolla/dwolla-v2-node
var requestBody = {
  url: "http://myawesomeapplication.com/destination",
  secret: "your webhook secret",
};
dwolla
  .post("webhook-subscriptions", requestBody)
  .then((res) => res.headers.get("location")); // => 'https://api-sandbox.dwolla.com/webhook-subscriptions/5af4c10a-f6de-4ac8-840d-42cb65454216'
# Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python
request_body = {
  'url': 'http://myapplication.com/webhooks',
  'secret': 'sshhhhhh'
}
subscription = app_token.post('webhook-subscriptions', request_body)
subscription.headers['location'] # => 'https://api-sandbox.dwolla.com/webhook-subscriptions/5af4c10a-f6de-4ac8-840d-42cb65454216'
<?php
// Using dwollaswagger - https://github.com/Dwolla/dwolla-swagger-php
$webhookApi = new DwollaSwagger\WebhooksubscriptionsApi($apiClient);
$subscription = $webhookApi->create(array (
  'url' => 'http://myapplication.com/webhooks',
  'secret' => 'sshhhhhh',
));
$subscription; # => "https://api-sandbox.dwolla.com/webhook-subscriptions/5af4c10a-f6de-4ac8-840d-42cb65454216"
?>
# Using dwolla_v2 - https://github.com/Dwolla/dwolla-v2-ruby
request_body = {
  :url => "http://myawesomeapplication.com/destination",
  :secret => "your webhook secret"
}
subscription = app_token.post "webhook-subscriptions", request_body
subscription.response_headers[:location] # => "https://api-sandbox.dwolla.com/webhook-subscriptions/5af4c10a-f6de-4ac8-840d-42cb65454216"

400

403

404

429

{
  "code": "ValidationError",
  "message": "Validation error(s) present. See embedded errors list for more details.",
  "_embedded": {
    "errors": [\
      {\
        "code": "InvalidFormat",\
        "message": "Url must be a valid url.",\
        "path": "/url",\
        "_links": {}\
      }\
    ]
  }
}
{
  "code": "Forbidden",
  "message": "The supplied credentials are not authorized for this resource."
}
{
  "code": "NotFound",
  "message": "The requested resource was not found."
}
{
  "code": "Too Many Requests",
  "message": "Please wait a short period of time before re-attempting the request."
}

Authorizations

Authorization

string

header

required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

Accept

enum

default:application/vnd.dwolla.v1.hal+json

required

The media type of the response. Must be application/vnd.dwolla.v1.hal+json

Available options:

application/vnd.dwolla.v1.hal+json

Body

application/json

Parameters to create a webhook subscriptions

url

string

required

Example:

"http://myapplication.com/webhooks"

secret

string

required

Example:

"sshhhhhh"

Response

201

create