Multiple webhook events


(Colton Milbrandt) #1

We are getting multiple webhook events for the same transaction even though I am returning a 200 HTTP Response code when processing the webhook event in our server.

Information:
Environment: Dwolla Sand Box Environment
Dwolla Product: White Label

According to the doc, dwolla only tries re-sending the webhook If Dwolla receives a status code greater than a HTTP 400.


(Chris Antonellis) #2

@coltonmilbrandt The webhooks you’re seeing represent the source and destination of the transfer. One event is created for each funding source ( or Dwolla balance ) that is related to the transfer.


(Colton Milbrandt) #3

First of all, when you create a transfer you get an event with the “customer_transfer_created” topic. If the transfer is completed without any problem you get another event with the “customer_transfer_completed” topic. You do not get two events from the source and two more events from the destination.

But even if you are correct. I ran to the same problem (multiple webhook for the same event) when creating a white label account (CUSTOMER). As you already know, you get an event for this action with the “customer_created” topic. And again, I get this event multiple times, even after I return a 200 HTTP code response on the very first webhook event.

Is there particular response body I need to return when I receive the webhook or just By returning a 200 HTTP response code is enough? The reason I ask is because I am also working with another third party service and they have the same concept about webhook and they required to response with 200 HTTP response code BUT they are also require me to return a specific STRING otherwise the webhook is considered a failure


(Spencer Hunter) #4

Hi @coltonmilbrandt, To add on to what @chrisantonellis is saying, a single request to the API can trigger multiple events if you have authorization to view events for both parties involved in the transfer. As a sanity check, do you happen to have multiple webhook subscriptions created for the same url? This could potential fire double the amount of webhooks. As an aside, Webhooks are sent asynchronously and are not guaranteed to be delivered in order. We recommend that applications protect against duplicated events by making event processing idempotent.

A “200 OK” HTTP response code is sufficient in acknowledging that you’ve received the data.


(Cory Anderson) #5

(Cory Anderson) #6

(Cory Anderson) #7