Transaction Outcome Field for Service Fee

New attributes representing service fee are added to the transaction outcome:

  • serviceFeeAmount - The service fee amount.
  • 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.

CWS

The “paymentTransactionData” field in the transaction response will have new fields for service fee information. The following is the transaction response for an EMV Contactless transaction.

Response (Percentage Based)

{
    "requestId": "518724705",
    "statusDetails": "REQUEST_ACCEPTED",
    "data": {
        "paymentGatewayCommand": {
            "completed": true,
            "eventQueue": [],
            "chanId": "5e507858-551a-4fbe-b962-6d3db9ddce7d",
            "paymentTransactionData": {
                "transactionType": "SALE",
                "id": "180521A3F-488D1600-4619-4876-9760-32B485C7A2A8",
                "date": "Tue May 18 18:33:52 EDT 2021",
                "amount": {
                    "value": 100,
                    "currencyCode": "USD"
                },
                "gratuityAmount": {
                    "value": 0,
                    "currencyCode": "USD"
                },
                "serviceFeeAmount": {
                    "value": 100,
                    "currencyCode": "USD"
                },
                "serviceFeeTransactionId": "180521A3F-644C40DA-D564-4165-92A6-F95A998B5B07",
                "serviceFeeTransactionApprovalCode": "906469",
                "serviceFeeTransactionDate": "Tue May 18 18:33:52 EDT 2021",
                "amountAuthorized": {
                    "value": 200,
                    "currencyCode": "USD"
                },
                "firstName": "******",
                "lastName": "******",
                "cardEntryType": "EMV_PROXIMITY",
                "cardScheme": "VISA",
                "cardType": "CREDIT",
                "result": "APPROVED",
                "tenderType": "CARD",
                "approved": "yes",
                "state": "UNKNOWN",
                "authCode": "******",
                "maskedPan": "******",
                "iccAid": "A0000000031010",
                "iccAppName": "VISA CREDIT",
                "iccTvr": "0000000000",
                "iccTsi": "",
                "iccCvmr": "UNKNOWN",
                "iccMode": "ICC_MODE",
                "errors": []
            }
        }
    }
}

Java

// Suppose a transaction is complete and the following instance outcome represents the transaction outcome.
ECLTransactionOutcome outcome;
 
// Get the service fee amount.
ECLMoney serviceFeeAmount = outcome.getServiceFeeAmount();
 
// Get other service fee transaction fields.
String serviceFeeTransactionId = outcome.getServiceFeeTransactionId();
String serviceFeeTransactionApprovalCode = outcome.getServiceFeeTransactionApprovalCode();
Date serviceFeeTransactionDate = outcome.getServiceFeeTransactionDate();

Objective-C (iOS)

// Suppose a transaction is complete and the following instance outcome represents the transaction outcome.
ECLTransactionOutcome *outcome;
 
if ([outcome isKindOfClass:[ECLCardTransactionOutcome class]]) {
    ECLCardTransactionOutcome *cardOutcome = (ECLCardTransactionOutcome *)outcome;
 
    // Get the service fee amount.
    ECLMoney *serviceFeeAmount = cardOutcome.serviceFeeAmount;
     
    // Get other service fee transaction fields.
    NSString *serviceFeeTransactionId = cardOutcome.serviceFeeTransactionIdentifier;
    NSString *serviceFeeTransactionApprovalCode = cardOutcome.serviceFeeTransactionAuthCode;
    NSDate *serviceFeeTransactionDate = cardOutcome.serviceFeeTransactionDateTime;
}

C#

// Suppose a sale transaction is approved and the following object paymentData of PaymentTransactionData represents the transaction result
PaymentTransactionData paymentData = paymentResults.PaymentTransactionData;
 
// Get the service fee amount.
Money serviceFeeAmount = paymentData.serviceFeeAmount;
 
// Get other service fee transaction fields.
string serviceFeeTransactionId = paymentData.serviceFeeTransactionId;
string serviceFeeTransactionApprovalCode = paymentData.serviceFeeTransactionApprovalCode;
string serviceFeeTransactionDate = paymentData.serviceFeeTransactionDate; // in format like "Tue May 18 18:33:52 EDT 2021"