Posts: 14
Registered: ‎07-04-2017
Accepted Solution
RefID not being returned in get transaction detail

I am trying to get the refId from the transaction details related to a webhook response to a Hosted Accept page (the payment page works, get a token, getting the webhook response with no problems) and the refId (our order number) that is sent to the transaction is not getting returned in the refId from the get trans detail.


The code I use to set the refId is on getting the payment page:


GetHostedPaymentPageRequest apiRequest = new GetHostedPaymentPageRequest();

GetHostedPaymentPageController controller = new GetHostedPaymentPageController(apiRequest);

GetHostedPaymentPageResponse response = new GetHostedPaymentPageResponse();
response = controller.getApiResponse();


The getting and using of the page works fine, but when I get the transaction deatils from the transactionId passed back in the webhook, it returns null for the refId.


The code I am using to get the transaction data works with no problem and is below:


public static GetTransactionDetailsResponse getAnetTransaction(String transactionId)
MerchantAuthenticationType merchantAuthenticationType = new MerchantAuthenticationType() ;

GetTransactionDetailsRequest getRequest = new GetTransactionDetailsRequest();

GetTransactionDetailsController controller = new GetTransactionDetailsController(getRequest);
GetTransactionDetailsResponse getResponse = controller.getApiResponse();

if (getResponse != null)
if (getResponse.getMessages().getResultCode() == MessageTypeEnum.OK)
System.out.println(new Date().toString() + " - >>>> getAnetTransaction: Got ANET transaction data for OrderNo: " + getResponse.getRefId());
System.out.println(new Date().toString() + " - >>>> getAnetTransaction: Failed to get transaction details: transactionId: " + transactionId
+ " ResultCode: "+ getResponse.getMessages().getResultCode());
return getResponse;


Can someone let me know if I am missing something or this is the incorrect way to link a webhook to the order that is processed?


I have not been able to find anything else on how to link a payment result to the initiating order that is linked to the webhook trans ID as the trans id does not seem to be returned with the page initialization.


Thanks for any help,


Who Me Too'd this topic