Web Hook subscription

(Ashwini S) #1

Hi …

Web-hook subscription with V1 flow is working fine. (i.e. mentioned web-hook callback URL in dwolla application settings by enabling Web Hook Notifications)

But when we used same call-back URL with V2 Post API “https://api-uat.dwolla.com/webhook-subscriptions”, Than not able to fire call-back method.

Can any one please guide us how to use weeb-hook subscription API to update transfer status.

Ashwini S

(Spencer Hunter) #2

@ashwini_s, If you haven’t taken a look at the webhooks guide, then I would recommend checking it out. It gives a brief overview of what webhooks are and how to subscribe a url that we will deliver Events related to a Customer or Account.

Once you subscribe a webhook url, we will POST to a url you specify which contains an Event object contained in the body of the request. You will then follow the “resource” link to lookup more information about the transfer like the status. Throughout the transfer lifecycle we will notify your application of any change in the transfer status.

To test and verify that webhooks are firing, you can subscribe a url from http://requestb.in/ that will be used to capture webhook requests.

Let us know if you have any follow up questions, or if you continue to run into issues with webhooks in API v2!

(Ashwini S) #3

Thanks for u kind replay…

Following is the code to create web hook subscription

Step 1:
 var tokenDetails = new Dictionary<string, string>
            {"client_id", dwollaKey},
    HttpResponseMessage tokenResponse = client.PostAsync("https://uat.dwolla.com/oauth/v2/token", new StringContent(Jss.Serialize(tokenDetails), Encoding.UTF8, "application/json")).Result;

Step 2:

Using autho token from above response we made second call to create webhook subscription

  var webhookSubscription = new Dictionary<string, string>
                {"url","we given our site url here having call back function"},//callBackUri callback url

HttpResponseMessage webhookResponse = client.PostAsync(“https://api-uat.dwolla.com/webhook-subscriptions”, new StringContent(Jss.Serialize(webhookSubscription), Encoding.UTF8, “application/json”)).Result;

Got response Create with header.location as

But when we change transfer status its not firing any call back events can you please help us regarding this…

Its urgent

(Spencer Hunter) #4

@ashwini_s, Strange. I just tested this in UAT was able to get subsequent webhooks after processing a pending transfer. Are theses webhooks showing up in your list of webhooks belonging to your subscription. Try doing a GET to /webhook-subscriptions/030a36c8-cd9f-439b-b39b-6d4bd23cd226/webhooks.

Also, you should see these transfer events in your list of events.

Dwolla API V2 for Webhook