cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Webhook transaction notification > transaction details request > record not found

Curious if anybody else seen an issue like this?

 

I'm testing transaction webhooks. Our handler script receives a transaction notification then does a request to getTransactionDetails() with the transaction id from the notification.

 

This worked as expected the first couple of times, but on the fourth test the getTransactionDetails() response came back with an error: E00040  The record cannot be found.

 

That's really odd because the details request is triggered by a notification of the completed transaction. The transaction obviously exists at that point, so why the error saying it cannot be found? I can see the transaction in the Merchant Interface.

coppercup
Regular Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

Hello @coppercup

 

This is likely due to brief latency in data replication.  Follow-on requests like get transaction details use replicated data to improve performance.  If you allow a short period after creating a transaction, it should be available.

 

Richard

View solution in original post

RichardH
Administrator Administrator
Administrator
4 REPLIES 4

Hello @coppercup

 

This is likely due to brief latency in data replication.  Follow-on requests like get transaction details use replicated data to improve performance.  If you allow a short period after creating a transaction, it should be available.

 

Richard

RichardH
Administrator Administrator
Administrator

Thanks for the good explanation Richard.

 

As a thought, perhaps the webhook notification should not be sent until the transaction data is replicated.

 

The point of a webhook is to enable a programmatic response to an action that has already occurred, which becomes an iffy proposition when:

 

  1. the notification payload does not contain all of the relevant/necessary data,
  2. so, the encouraged procedure is to perform an API request to retrieve the data,
  3. and, the obvious trigger to perform the request is receipt of the notification,
  4. but, such requests may fail due to latency of data replication.

Rather than letting developer guess how long a script should wait, and code a pause into the script, a far more foolproof solution would be to trigger sending the notification only after the data has been replicated.

coppercup
Regular Contributor

Separate question: What is the maximum latency we need to plan for?

coppercup
Regular Contributor

yes i have the same issue

zoziano
Member