Transaction Search Result for Service Fee
New attributes representing service fee are added to the transaction outcome:
serviceFeeAmount
- The service fee amount.refundedServiceFeeAmount
- The service fee amount that has been refunded. Only applicable for a SALE transaction.serviceFeeTransactionId
- The unique transaction ID for the service fee transaction.serviceFeeTransactionApprovalCode
- The approval code for the service fee transaction.serviceFeeTransactionDate
- The date and time of the service fee transaction.
The following code shows how to retrieve the attributes from different integration platforms.
Code Samples
CWS
Sending search transaction request
Request
{
"method": "searchPaymentTransaction",
"requestId": "1204829093",
"targetType": "paymentGatewayConverge",
"version": "1.0",
"parameters": {
"paymentGatewayId": "7bb5664a-3acd-4b69-b539-06c0553268f7",
"beginDate": "20210518",
"endDate": "20210518"
}
}
Response
{
"requestId": "1204829093",
"statusDetails": "REQUEST_ACCEPTED",
"data": {
"paymentGatewayCommand": {
"transactionSearchResults": {
"completed": true,
"eventQueue": [],
"transactions": [{
"id": "180521A3F-488D1600-4619-4876-9760-32B485C7A2A8",
"state": "UNCOMMITTED",
"result": "APPROVED",
"date": "2021/05/18 18:33:52",
"currencyCode": null,
"maskedPan": "******",
"cardType": "CREDIT",
"amount": {
"value": 100,
"currencyCode": "USD"
},
"amountRefundable": {
"value": 100,
"currencyCode": "USD"
},
"amountRefunded": {
"value": 0,
"currencyCode": "USD"
},
"serviceFeeAmount": {
"value": 100,
"currencyCode": "USD"
},
"refundedServiceFeeAmount": {
"value": 0,
"currencyCode": "USD"
},
"serviceFeeTransactionId": "180521A3F-644C40DA-D564-4165-92A6-F95A998B5B07",
"serviceFeeTransactionApprovalCode": "897330",
"serviceFeeTransactionDate": "2021/05/18 18:33:50",
"signatureBitmap": null,
"totalSurchargeAmount": null,
"transactionType": "SALE",
"note": null,
"firstName": null,
"lastName": null,
"iccAppName": "VISA CREDIT",
"iccCvmr": "FAILED",
"iccAid": "A0000000031010",
"iccTsi": null,
"iccTvr": "0000000000",
"tenderType": "CARD",
"avsresponse": null,
"cardScheme": "VISA",
"invoiceNumber": null,
"authCode": "******",
"octRefNumber": null,
"cardEntryType": "EMV_CONTACT",
"tax": null,
"gratuityAmount": null,
"refundable": "Y",
"voidable": "Y",
"laneNumber": null,
"expDate": "1222",
"surchargeAmountRefunded": null
}],
"status": "SUCCESS",
"messages": []
}
}
}
}
Java
// Suppose transaction search is performed and a list of transaction search results is returned to the callback method
ECLTransactionSearchListener idSearchListener = new ECLTransactionSearchListener()
{
@Override
public void transactionSearchDidSucceed(ECLTransactionSearchCriteriaInterface criteria, List<ECLTransactionSearchResult> eclTransactionSearchResults)
{
for (ECLTransactionSearchResult result : eclTransactionSearchResults)
{
ECLMoney serviceFeeAmount = result.getTotalServiceFeeAmount();
ECLMoney refundedServiceFeeAmount = result.getRefundedServiceFeeAmount();
String serviceFeeTransactionId = result.getServiceFeeTransactionId();
String serviceFeeTransactionApprovalCode = result.getServiceFeeTransactionApprovalCode();
Date serviceFeeTransactionDate = result.getServiceFeeTransactionDate();
}
Objective-C (iOS)
// Suppose transaction search is performed and a list of transaction search results is returned to the callback method
- (void)transactionSearchDidSucceed:(id<ECLTransactionSearchCriteriaProtocol>)criteria results:(ECLTransactionSearchResults *)results {
NSUInteger count = [results count];
for (NSUInteger i=0; i<count; i++) {
ECLTransactionSearchResult *result = [results objectAtIndexedSubscript:i];
ECLMoney *serviceFee = result.serviceFee;
ECLMoney *refundedServiceFee = result.refundedServiceFee;
NSString *serviceFeeTransactionId = result.serviceFeeTransactionIdentifier;
NSString *serviceFeeTransactionApprovalCode = result.serviceFeeTransactionAuthCode;
NSDate *serviceFeeTransactionDate = result.serviceFeeTransactionDateTime;
}
}
C#
// Suppose transaction search is performed and a TransactionSearchResults object is returned.
TransactionSearchResults tsr;
TransactionSearchData tsd = tsr.getTransactionSearchData();
if (null != tsd)
{
Transaction[] trans = tsd.transactions;
if (null != trans)
{
foreach (Transaction tran in trans)
{
Money serviceFeeAmount = tran.serviceFeeAmount;
Money refundedServiceFeeAmount = tran.refundedServiceFeeAmount;
string serviceFeeTransactionId = tran.serviceFeeTransactionId;
string serviceFeeTransactionApprovalCode = paymentData.serviceFeeTransactionApprovalCode;
string serviceFeeTransactionDate = paymentData.serviceFeeTransactionDate; // in format like "2021/05/18 18:33:50"
}
}
}