# Webhook response

**URL:** <https://discuss.dwolla.com/t/webhook-response/8069>\
**Category:** General\
**Created:** [May 10, 2022, 1:35pm UTC](https://discuss.dwolla.com/t/webhook-response/8069 "2022-05-10T13:35:00Z")\
**Posts on this page:** 10\
**Page:** 1

<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, 1:35pm UTC](https://discuss.dwolla.com/t/webhook-response/8069/1 "2022-05-10T13:35:00Z")

</div>

Hello Teams,

I do have a few queries which I need help from you.

I have successfully created a webhook subscription and also able to see my webhook for the sandbox environment which all works fine. So, my doubt is how do I get the webhooks payload/response on every event for the webhook created.

Documentation link :[Process and Validating Dwolla Webhooks | Dwolla Documentation](https://developers.dwolla.com/guides/webhooks/process-validate).

**Case :** How do I get the webhook response, which is mentioned in the documentation as “A few days after the customer initiates his payment, **your application receives this webhook**.” Where do I get to that webhook as a response, however I successfully hit on that url (which we entered while creating the webhook-subscription). But I’m not sure how to get the webhook for validation and other functionality. Please let me know if I am missing something.  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![james](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/james/32/3524_2.png) [@james](https://discuss.dwolla.com/u/james)\
**Post date:** [May 10, 2022, 5:47pm UTC](https://discuss.dwolla.com/t/webhook-response/8069/2 "2022-05-10T17:47:04Z")

</div>

Hey, @Pardeep_Kumar,

Webhooks allow Dwolla to send an event to your application without the need to poll our API for changes/updates. This can be, for example, when a customer account is created, a funding source is created, etc. This can be determined via the webhook `topic` property; for a complete list of webhook topics that Dwolla may send, check out our documentation page on [supported events by resource](https://developers.dwolla.com/concepts/webhook-events#list-of-supported-events-by-resource).

In order to receive webhooks, you will first want to [create a webhook subscription](https://developers.dwolla.com/api-reference/webhook-subscriptions/create). When a new subscription is created, we require two fields to be passed to us: `url`, which is the publicly available URL that we will send the webhook to via an HTTP `POST` request, and `secret`, which is the secret value that only your application and Dwolla will share. This will be used when validating webhooks to ensure that the sender of the webhook is Dwolla and not an impersonator.

Once you have the subscription set up, your application will then listen for `POST` requests at the URL endpoint that you sent to Dwolla. Once a request has been received, your application should then “consume” the request by validating that it was sent from Dwolla (this can be done by using the SHA-256 HMAC checksum of the JSON-encoded body and the shared `secret` value, in conjunction with the `X-Request-Signature-SHA-256` request header) and then responding with a 2xx status code.

Once you have consumed the webhook and responded to Dwolla, you are then free to perform any business logic that you feel is necessary. For example, you could update a database entry, send a notification email/message, etc.

Although there are many different ways that a webhook listener can be architected, I recommend checking out our [webhook-receiver](https://github.com/Dwolla/webhook-receiver) project on GitHub. It’s an open source project written in TypeScript that should give a better idea on how a webhook subscription can be created, consumed, and then queued for further processing using AWS Lambda and SQS.

I hope that this helps! Please let us know if you have any further questions!

Thanks,  
James

---

<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, 1:33pm UTC](https://discuss.dwolla.com/t/webhook-response/8069/3 "2022-05-11T13:33:30Z")

</div>

@james, 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).  
Is there I am missing any method or step.  
 ![image](https://global.discourse-cdn.com/dwolla/original/2X/c/c74d9a1d3c22a4e8513abe28f1d3f4242e22a10d.png)

---

<div class="post-metadata">

**Author:** ![james](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/james/32/3524_2.png) [@james](https://discuss.dwolla.com/u/james)\
**Post date:** [May 11, 2022, 5:05pm UTC](https://discuss.dwolla.com/t/webhook-response/8069/4 "2022-05-11T17:05:55Z")

</div>

Hey, @Pardeep_Kumar,

Unfortunately, we only have one official example application that receives webhooks written in TypeScript; however, I will make sure to log your feedback for the team to take a look at regarding creating a separate webhook example in C#.

At its core, though, a webhook handler is an HTTP listener. To this end, depending on the framework/language that you’re currently working with, you should be able to find some resources online to assist with getting that part up and running. For example, if you’re using C# with AWS Lambda, then [their documentation](https://docs.aws.amazon.com/lambda/latest/dg/csharp-handler.html) should be helpful!

Once your application is up and running and accepting HTTP `POST` requests, after you configure your webhook subscription, the next step would be to authenticate that the webhook came from Dwolla using the shared `secret` value that was passed in when creating the subscription. Similar to before, although we don’t have an official example on how this can be done in C#, I’d recommend checking out [this forum post](https://discuss.dwolla.com/t/validating-webhooks-in-c/7913) from another member instead.

Finally, once you have authenticated that the webhook is from Dwolla, you should then be able to handle any business logic that you deem necessary within your application, such as passing the webhook onto a queue for further processing.

I hope that this helps! Please let us know if you have any further questions!

Thanks,  
James

---

<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 12, 2022, 7:27am UTC](https://discuss.dwolla.com/t/webhook-response/8069/5 "2022-05-12T07:27:55Z")

</div>

Thanks @james for your quick reply. It resolved and now am able to receive webhook successfully.

---

<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 12, 2022, 11:00am UTC](https://discuss.dwolla.com/t/webhook-response/8069/6 "2022-05-12T11:00:45Z")

</div>

Hello @james, I have a question, do we create Webhook-Subscriptions manually or only through code?

---

<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:54pm UTC](https://discuss.dwolla.com/t/webhook-response/8069/7 "2022-05-13T21:54:24Z")

</div>

Hi @Pardeep_Kumar – you’ll have to create a webhook subscription via the API - [Webhooks | Dwolla API Documentation](https://developers.dwolla.com/guides/webhooks)

---

<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 16, 2022, 1:54pm UTC](https://discuss.dwolla.com/t/webhook-response/8069/8 "2022-05-16T13:54:47Z")

</div>

@shreya Thanks.

---

<div class="post-metadata">

**Author:** ![aakashgameium](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/aakashgameium/32/3998_2.png) [@aakashgameium](https://discuss.dwolla.com/u/aakashgameium)\
**Post date:** [August 23, 2023, 8:31am UTC](https://discuss.dwolla.com/t/webhook-response/8069/9 "2023-08-23T08:31:12Z")

</div>

Hey @james , @shreya  
I can see that we receive _resourceId_ in webhook payload, which is same as location received on CREATE TRANSFER API.

But the issue is I am receiving same location id in all CREATE TRANSFER response. So in webhook as well we receive same _resourceId_ in all webhook response. So my question is, how can i identify that for which payment i received completed/failed webhook response?

---

<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:** [August 23, 2023, 3:25pm UTC](https://discuss.dwolla.com/t/webhook-response/8069/10 "2023-08-23T15:25:02Z")

</div>

Hi @aakashgameium – it sounds like you may be getting the same resourceId in the location because the idempotency-key header value in the new transfer request is the same.

If you reattempt a `POST` request with the same value for the [`Idempotency-Key`](https://developers.dwolla.com/api-reference#idempotency-key) , rather than creating new or potentially duplicate resources, you will receive a `201 Created` , with the original response of the created resource.
