Here is what my app (Nodejs) is currently doing, and the assumptions I am making. Please verify if it is possible to continue with this set-up.
Also, can any other events, beside transfers, be duplicated?
The short version is that my app is storing resourceIDs, and that it seems like there is a scenario where that could work, instead of using eventIDs, as suggested in this link (step B):
- Initiates transfers, and on callback, persist the sender, receiver and resourceID.
-I assume that there is a single response for the callback. To me, it does not matter if the resourceID within the response is associated with the sender or receiver.
- On transfer webhook events, only act on the event if the resouceID is in the database.
I finally got around to testing this. It turns out that, in order to prevent acting on duplicated webhooks (because dwolla can send the same event for each accountID involved), you can also use resourceIDs the same way the docs suggest to use eventIDs. That is, you can persist the event topic (i.e. transfer_created) along with the resourceID as a record that you already processed this.
My train of thought was that eventIDs were the only IDs that would be the same between duplicated events. It turns out that resourceIDs are also duplicated. I like using resourceIDs because they are also sent in the transfer callback response.