5 posts / 0 new
Last post
israeldiaz14258
WebHook problem when i called Get Event by ID -- EventID Not Found

I already configure all related to webhooks, and i get the request perfectly. But when i go to get the event id there is a problem

{
"eventID": "8a2ee6fc5c20cef5015c4688a98a5b83",
"eventTime": "May 26, 2017 4:53:00 PM",
"eventName": "TRANSACTION_STATUS",
"payload": {
"amount": "44200",
"transaction_time": "1495831980424",
"status": "approved",
"transaction_type": "purchase",
"transaction_tag": "155267771",
"signature": "[LONG TEXT]",
"transaction_id": "[TRANSACTION_ID]",
"currency": "USD",
"ref_data": "[REFERENCE]",
"correlation_id": "124.9583197989651"
}
}

Then i go to call Get Event By Id Endpoint
(https://developer.payeezy.com/payeezy-api/apis/get/events/%7Bid%7D)
In the first call to this endpoint after i get the webhook i get this response:

{"error":{"message":{"correlation_id":"124.9583202827065","Error":{"messages":[{"code":"404","description":"No event with id 8a2ee6fc5c20cef5015c4688a98a5b83 is found"}]}},"status_code":400}}

If i simulate a new call with same request data (im using ngrok for this do and only click on replay button) i get the expected response:

{"id":"8a2ee6fc5c20cef5015c4688a98a5b83","eventType":"TRANSACTION_STATUS","message":{"amount":"44200","transaction_time":"1495831980424","status":"approved","transaction_type":"purchase","transaction_tag":"[TRANSACTION_TAG]","transaction_id":"[TRANSACTION_ID","currency":"USD","ref_data":"[REFERENCE]","correlation_id":"124.9583197989651"},"createTime":"2017-05-26 16:53:00.426"}


christopherlord730
Re: WebHook problem when i called Get Event by ID -- EventID...

Using the Docs & Sandbox I was able to retrieve the event. Are you appending the event ID to the end of the request URL?

{
"id": "8a2ee6fc5c20cef5015c4688a98a5b83",
"eventType": "TRANSACTION_STATUS",
"message": {
"amount": "44200",
"transaction_time": "1495831980424",
"status": "approved",
"transaction_type": "purchase",
"transaction_tag": "155267771",
"transaction_id": "ET168505",
"currency": "USD",
"ref_data": "GCO-GoCoOpe",
"correlation_id": "124.9583197989651"
},
"createTime": "2017-05-26 16:53:00.426"
}


israeldiaz14258
Re: WebHook problem when i called Get Event by ID -- EventID...

Yes i append the event ID to the end of the request URL.
Actually the second time i make the request it works. but this second request i make it manually
The first time i call the endpoint it dont work.
if you call the event immediately after get the webhook request. this dont work


israeldiaz14258
Re: WebHook problem when i called Get Event by ID -- EventID...

I send all correctly. Actually the error show is that the event id is not found like dont exists.

{"error":{"message":{"correlation_id":"124.9583202827065","Error":{"messages":[{"code":"404","description":"No event with id 8a2ee6fc5c20cef5015c4688a98a5b83 is found"}]}},"status_code":400}}


christopherlord730
Re: WebHook problem when i called Get Event by ID -- EventID...

What is the timestamp for the transaction in UTC and for the initial call for the event ID? It sounds like not enough time has elapsed to create the event object.