When customers purchase on our website, we are collecting their data (name, address, etc) and then passing it to auth.net via Access Hosted. We have a page that retrieves the webhook data when the transaction is appoved. After the transaction is made, we are trying to display a page with links based on the product they purchase.
The problem is, as we understand, the webhook gets the latest transaction, however if three people purchase on our website at the same time, how do we know which webhook goes to which person? We can't store the customer's data in session because the user goes to the payment form on auth.net. If there was some kind of link between the user's browser and the webhook, we would know who purchased what. It would help to be able to query the webhook somehow, like "Get webhook with invoice 123456". As of now it seems totally random which data we get back from the webhook.
The way this used to work with us is that we would send auth.net the user's data via the ID field. After the transaction was approved, they would pass that ID back to us so we can link them to the purchase and the POST data does not leave the user's browser.
05-08-2018 10:26 AM
Hi @tapseries
You can pass a merchantReferenceID in your payment transaction request .
refId | Merchant-assigned reference ID for the request. If included in the request, this value is included in the response. |
Once you have recieved the Webhook notificaiton of a payment , you can call our getTransactionDetails API using the transID in the notification and retireve the transactionDetails .
The transactionDetails response will also have the same merchant ReferenceID which was passed in the payment request .
We are going to update the payment webhook notification in our next release to return the merchantReferenceID so the extra API call is also not needed .
Hope it helps !!!
05-09-2018 09:36 AM - edited 05-09-2018 09:40 AM
@Anurag wrote:
We are going to update the payment webhook notification in our next release to return the merchantReferenceID so the extra API call is also not needed .
Anurag,
Did this addition (quoted above) actually happen, and if so, is it in production or only in sandboxes right now? A few weeks ago I was told by Authorize.net support that the merchant reference ID was still not included in webhooks, but I finally get to the point of being able to start testing them today in my sandbox, and there is indeed a merchantReferenceId element in the webhook response (for a payment auth/capture) that corresponds to the refid we sent with our Accept Hosted redirect request. I'd like to use this if it is actually supported now, but after being told so recently that it wasn't, I'm leery of just making the assumption that this is available in production.
Thanks for any light you can shed on this.
11-22-2019 01:05 PM
It is in the production responses. Sandbox and production work identically, and I just verified on a log of a production transaction it is in there. This is very recent. Past week or so.
11-23-2019 01:07 AM
Wow, it was just added in the last week, eh? Timely for our purposes, at least. Thanks much for that info.
11-25-2019 06:08 AM
AMF Bowling is efforting to maintain the customers’ satisfaction by taking the AMF Bowling Customer Feedback Survey at the survey.
http://customerfeedbacksurvey.info/
11-25-2019 10:29 PM
11-27-2019 08:01 AM