Reply
Regular Contributor
Posts: 53
Registered: ‎10-28-2015
Accepted Solution

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.


Accepted Solutions
Solution
Accepted by topic author coppercup
‎08-28-2018 07:41 AM
Posts: 2,765
Topics: 57
Kudos: 270
Blog Posts: 67
Registered: ‎12-05-2011

Re: Webhook transaction notification > transaction details request > record not found

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


All Replies
Solution
Accepted by topic author coppercup
‎08-28-2018 07:41 AM
Posts: 2,765
Topics: 57
Kudos: 270
Blog Posts: 67
Registered: ‎12-05-2011

Re: Webhook transaction notification > transaction details request > record not found

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

Regular Contributor
Posts: 53
Registered: ‎10-28-2015

Re: Webhook transaction notification > transaction details request > record not found

[ Edited ]

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.

Regular Contributor
Posts: 53
Registered: ‎10-28-2015

Re: Webhook transaction notification > transaction details request > record not found

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

Member
Posts: 4
Registered: ‎10-04-2018

Re: Webhook transaction notification > transaction details request > record not found

yes i have the same issue