Webhook POST request - id duplication


(Luis Ortíz) #1

Hello good afternoon, I’m working with the web hooks and going through your documentation, and in the it you have the following JSON as example:

{
  "id": "fe869b23-097b-4c95-9891-cb59c753a895",
  "resourceId": "ac84655e-8d28-e911-8115-c4a646b43d5b",
  "topic": "customer_transfer_completed",
  "timestamp": "2019-02-04T14:58:45.144Z",
  "_links": {
    "self": {
      "href": "https://api-sandbox.dwolla.com/events/fe869b23-097b-4c95-9891-cb59c753a895"
    },
    "account": {
      "href": "https://api-sandbox.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254"
    },
    "resource": {
      "href": "https://api-sandbox.dwolla.com/transfers/ac84655e-8d28-e911-8115-c4a646b43d5b"
    },
    "customer": {
      "href": "https://api-sandbox.dwolla.com/customers/6c57f372-e9a0-47d4-91f3-ab2b3aae56f0"
    }
  },
  "created": "2019-02-04T14:58:45.144Z"
}

And I wonder if the ID value that is present in the body of the request, is the same, even when the request repeats itself? if the request repeats, the ID present in the post request, changes?


(Spencer Hunter) #2

Hi @Luis_Ortiz, The id in the webhok payload is the Event ID. An Event can be delivered by a webhook more than one time, if for example, you failed to properly handle the first webhook that contained that Event. I’d likely recommend using that id for making your Event processing Idempotent.


(Luis Ortíz) #3

Ok, thanks