Webhook ID is sending an incorrect value

We are submitting multiple transfer requests to the sandbox API and we receive the following responseheader:

“Responseheader”:{“Location”:https://api-sandbox.dwolla.com/transfers/a8bd17c5-6301-ec11-8137-d4c9c28fa0b6

I take the ‘a8bd…’ value and store it in the database. We have a webhook set up, which send us a post almost immediately after the request is made. The issue is that the value it’s passing as the id is something different, it’s incremented by 1 ‘a7bd…’ why is that the case?

“getHTTPRequest {“id”:“ee3e48d7-ac2f-4836-ab0c-77a58bf5a182”,“resourceId”:“a7bd17c5-6301-ec11-8137-d4c9c28fa0b6”,“topic”:“customer_bank_transfer_created”,“timestamp”:“2021-08-20T03:07:36.527Z”,”_links":{“self”:{“href”:https://api-sandbox.dwolla.com/events/ee3e48d7-ac2f-4836-ab0c-77a58bf5a182},“account”:{“href”:https://api-sandbox.dwolla.com/accounts/6d1a9fe4-90e9-4d42-8231-03f70934c9c1},“resource”:{“href”:https://api-sandbox.dwolla.com/transfers/a7bd17c5-6301-ec11-8137-d4c9c28fa0b6},“customer”:{“href”:https://api-sandbox.dwolla.com/customers/e3c8194a-cc68-4be0-bac9-840765d90357}},“created”:“2021-08-20T03:07:36.527Z”} (07:24:296)"

Hi @ngivoni

This may be different legs of the same transaction. Looks like a7bd17c5-6301-ec11-8137-d4c9c28fa0b6 came from Plaid and a8bd17c5-6301-ec11-8137-d4c9c28fa0b6 came from the balance of userid e3c8194a-cc68-4be0-bac9-840765d90357 which came from the Plaid verified account.

Kelly,

I need a means to map the payload arriving in the webhook to an existing transaction…how can I do that if the resourceid is not the primary identifier?

Hi @ngivoni

You can supply a correlationId. When a webhook is delivered, call off to the API to extract the correlation ID and do a lookup.

Or you can use the funded-transfer and funding-transfer links. If you do a GET to the resource that includes the ID you don’t have, you could map that to the funded-transfer link which should be the one you have stored.

More info + suggestions can be found here

Kelly,

Are you stating that the webhook is to return a correlationID?

I can see by my logs that

  1. I pass in the correlationId in the API call to tranfer
  2. You return response payload
  3. But I don’t see it in the webhook call, should it be an element within the header information?

Hi @ngivoni

Your code should actually retrieve the resource link on the webhook payload to get the correlation ID.

The Event payload itself won’t include the correlationId field. These payloads were designed to be very lightweight and only include links to relevant resources in the API. The idea being, the event is used as a hint to call off to the API to get more information about the resource that changed state.