# Please correct me I am doing something wrong while creating webhooks

**URL:** <https://discuss.dwolla.com/t/please-correct-me-i-am-doing-something-wrong-while-creating-webhooks/8039>\
**Category:** General\
**Created:** [April 22, 2022, 10:06am UTC](https://discuss.dwolla.com/t/please-correct-me-i-am-doing-something-wrong-while-creating-webhooks/8039 "2022-04-22T10:06:52Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohammad\_Javed\_khan](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/mohammad_javed_khan/32/3465_2.png) [@Mohammad\_Javed\_khan](https://discuss.dwolla.com/u/Mohammad_Javed_khan)\
**Post date:** [April 22, 2022, 10:06am UTC](https://discuss.dwolla.com/t/please-correct-me-i-am-doing-something-wrong-while-creating-webhooks/8039/1 "2022-04-22T10:06:52Z")

</div>

Please correct me I am doing something wrong while creating webhooks

1. Firstly, I created the webhooks via Api by using  
$subscription = $webhookApi-\>create(array (  
‘url’ =\> ‘[https://abc.com/webhooks](https://abc.com/webhooks)’,  
‘secret’ =\> ‘ssh hhhhh’,  
));

2. My requirement is, that the webhook will only work for payment transactions, so please help me if I need to any additional parameters on the above request (Point 1).

3. Also please help me, I need to do some additional steps to receive an only payment related webhook.

4. Can you please share the transfer payment data, which I will receive through webhooks so that I will create my function in that way and how can I verify the secret key when receiving any webhook

---

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [April 22, 2022, 9:20pm UTC](https://discuss.dwolla.com/t/please-correct-me-i-am-doing-something-wrong-while-creating-webhooks/8039/2 "2022-04-22T21:20:26Z")

</div>

Hi @Mohammad_Javed_khan – when setting up a Webhook subscription, the URL you provide (like the one you provided above - [https://abc.com/webhooks](https://abc.com/webhooks)) should be a URL to your server where you want Dwolla to send HTTP webhook requests.

When you subscribe to webhooks, you will get webhooks for all events that occur in your platform, and not just transfer-related ones. [Here](https://developers.dwolla.com/api-reference/events)’s a list of all possible events that we might send webhooks for. You may choose to only process logic for selected webhooks, but you will need to respond to all webhook requests with an HTTP status code of level 2xx.

I found this [article](https://medium.com/hookdeck/webhooks-tutorial-the-beginners-guide-to-working-with-webhooks-79b711c4dd87#:~:text=Webhooks%20are%20user%2Ddefined%20HTTP,another%20application%20using%20a%20webhook) on Medium which explains webhooks, and how you can test webhooks locally for when you want to test this in Sandbox. I would recommend checking it out as a starting point. You can then test Dwolla’s webhooks in Sandbox by setting up a subscription, and continue testing by creating customer, funding-sources and transfers.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![vimal\_k](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/vimal_k/32/3312_2.png) [@vimal\_k](https://discuss.dwolla.com/u/vimal_k)\
**Post date:** [April 25, 2022, 5:08am UTC](https://discuss.dwolla.com/t/please-correct-me-i-am-doing-something-wrong-while-creating-webhooks/8039/4 "2022-04-25T05:08:52Z")

</div>

Hello @shreya, thank you for your response

As per my understanding, after creating the subscription webhook if any event occurs in the Dwolla sandbox then Dwolla automatically will send a request to the application URL (provided while creating the webhook). Please confirm

Also, I still need your help on how can we verify the secret key which I passed when creating the subscription along with the application URL.

---

<div class="post-metadata">

**Author:** ![vimal\_k](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/vimal_k/32/3312_2.png) [@vimal\_k](https://discuss.dwolla.com/u/vimal_k)\
**Post date:** [April 25, 2022, 5:36am UTC](https://discuss.dwolla.com/t/please-correct-me-i-am-doing-something-wrong-while-creating-webhooks/8039/5 "2022-04-25T05:36:18Z")

</div>

@shreya

Also in the Dwolla sandbox environment, I am not getting an option to test webhook by requesting. Please help me under which option I will get that.  
Please look at priority

---

<div class="post-metadata">

**Author:** ![vimal\_k](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/vimal_k/32/3312_2.png) [@vimal\_k](https://discuss.dwolla.com/u/vimal_k)\
**Post date:** [April 25, 2022, 12:42pm UTC](https://discuss.dwolla.com/t/please-correct-me-i-am-doing-something-wrong-while-creating-webhooks/8039/6 "2022-04-25T12:42:47Z")

</div>

@shreya Webhook is working at my side, but I am not able to get the request data format.  
Can you please help me…

---

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [April 25, 2022, 3:08pm UTC](https://discuss.dwolla.com/t/please-correct-me-i-am-doing-something-wrong-while-creating-webhooks/8039/7 "2022-04-25T15:08:47Z")

</div>

Hi @vimal_k!

> [@vimal\_k](#):
>
> Webhook is working at my side, but I am not able to get the request data format.

We explain the webhook request details in this developer doc. [Check it out here](https://developers.dwolla.com/concepts/webhook-events).

> [@vimal\_k](#):
>
> how can we verify the secret key which I passed when creating the subscription along with the application URL.

Validation of a webhook using the secret you provided is explained in this [documentation](https://developers.dwolla.com/guides/webhooks/process-validate).

If you come across any questions, please let us know!

---

<div class="post-metadata">

**Author:** ![Mohammad\_Javed\_khan](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/mohammad_javed_khan/32/3465_2.png) [@Mohammad\_Javed\_khan](https://discuss.dwolla.com/u/Mohammad_Javed_khan)\
**Post date:** [April 28, 2022, 6:07am UTC](https://discuss.dwolla.com/t/please-correct-me-i-am-doing-something-wrong-while-creating-webhooks/8039/8 "2022-04-28T06:07:11Z")

</div>

Hi @shreya How to verify secret key I have read your documentation but unable to understand

---

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [April 29, 2022, 9:54pm UTC](https://discuss.dwolla.com/t/please-correct-me-i-am-doing-something-wrong-while-creating-webhooks/8039/9 "2022-04-29T21:54:28Z")

</div>

Hi @Mohammad_Javed_khan – once you receive a webhook request, your will need to generate an SHA256 HMAC hash of the request body with the key being your webhook secret. Then, you will compare it to the value of the `X-Request-Signature-Sha-256` header that is found in the webhook request. If they’re the same, then you can be assured that the request came from Dwolla and not an impersonator.

---

<div class="post-metadata">

**Author:** ![Mohammad\_Javed\_khan](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/mohammad_javed_khan/32/3465_2.png) [@Mohammad\_Javed\_khan](https://discuss.dwolla.com/u/Mohammad_Javed_khan)\
**Post date:** [May 2, 2022, 6:29am UTC](https://discuss.dwolla.com/t/please-correct-me-i-am-doing-something-wrong-while-creating-webhooks/8039/10 "2022-05-02T06:29:54Z")

</div>

Hi @shreya  
I’m trying to validate webhooks in PHP following this guide  
I am requesting data from webhook when we transferred amount and getting payload data as we requested, In this when I am requesting - $request-\>header(‘X-Request-Signature-SHA-256’); getting null. Why ? is this another way to get the header

---

<div class="post-metadata">

**Author:** ![Mohammad\_Javed\_khan](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/mohammad_javed_khan/32/3465_2.png) [@Mohammad\_Javed\_khan](https://discuss.dwolla.com/u/Mohammad_Javed_khan)\
**Post date:** [May 5, 2022, 6:52am UTC](https://discuss.dwolla.com/t/please-correct-me-i-am-doing-something-wrong-while-creating-webhooks/8039/11 "2022-05-05T06:52:17Z")

</div>

@shreya is there any update ?

---

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [May 5, 2022, 7:20pm UTC](https://discuss.dwolla.com/t/please-correct-me-i-am-doing-something-wrong-while-creating-webhooks/8039/12 "2022-05-05T19:20:58Z")

</div>

Hi @Mohammad_Javed_khan – I don’t have a specific code example for it, but I’d start by listing the full request details, and then drilling down into headers. Also, could you try replacing `X-Request-Signature-Sha-256` with `X-Request-Signature-SHA-256` and seeing if that makes a difference? I believe the Docs might have a typo in the header name which I’ve logged a ticket for a fix!

---

<div class="post-metadata">

**Author:** ![Pardeep\_Kumar](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/pardeep_kumar/32/3487_2.png) [@Pardeep\_Kumar](https://discuss.dwolla.com/u/Pardeep_Kumar)\
**Post date:** [May 10, 2022, 2:23pm UTC](https://discuss.dwolla.com/t/please-correct-me-i-am-doing-something-wrong-while-creating-webhooks/8039/13 "2022-05-10T14:23:47Z")

</div>

Hi @shreya Could you please elaborate how do I get the webhook response, that we received from dwolla on the url (added while created the Webhook-subscription) As I see the documentation does not have anything related to this [Process and Validating Dwolla Webhooks | Dwolla Documentation](https://developers.dwolla.com/guides/webhooks/process-validate).

Although I have successfully created Webhook-subscription and able to see my webhooks on dashboard and able to get hit on my url on any webhook event.  
Can you please help me on this. Thanks!

---

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [May 10, 2022, 3:15pm UTC](https://discuss.dwolla.com/t/please-correct-me-i-am-doing-something-wrong-while-creating-webhooks/8039/14 "2022-05-10T15:15:46Z")

</div>

Hi @Pardeep_Kumar – referencing [this sample application](https://github.com/Dwolla/webhook-receiver) might be helpful to understand how you can get the webhook response, validate it and send it off to a queue for processing.

The app deploys a webhook handler as an AWS Lambda function using the Serverless Framework, but if that’s not what you’re using, you can still reference the webhook handler file for the code that is relevant with handling webhooks - [webhook-receiver/webhook.ts at main · Dwolla/webhook-receiver · GitHub](https://github.com/Dwolla/webhook-receiver/blob/main/src/handlers/webhook.ts)

---

<div class="post-metadata">

**Author:** ![Pardeep\_Kumar](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/pardeep_kumar/32/3487_2.png) [@Pardeep\_Kumar](https://discuss.dwolla.com/u/Pardeep_Kumar)\
**Post date:** [May 11, 2022, 10:10am UTC](https://discuss.dwolla.com/t/please-correct-me-i-am-doing-something-wrong-while-creating-webhooks/8039/15 "2022-05-11T10:10:03Z")

</div>

@shreya Thanks for you reply. I am implementing dwolla in C#, can you please provide sample application to get the webhook response as webhook payload (Json data contains webhook event data detail).  
 ![image](https://global.discourse-cdn.com/dwolla/original/2X/c/c74d9a1d3c22a4e8513abe28f1d3f4242e22a10d.png)

---

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [May 13, 2022, 9:58pm UTC](https://discuss.dwolla.com/t/please-correct-me-i-am-doing-something-wrong-while-creating-webhooks/8039/16 "2022-05-13T21:58:30Z")

</div>

Just closing the loop on this thread. This was answered in a separate post - [Webhook response - #4 by james](https://discuss.dwolla.com/t/webhook-response/8069/4)
