Stand Alone Refund

This transaction issues a refund to the cardholder's credit card.

error_outline
note

This transaction type requires a certified terminal to capture card data.

Code Samples

CWS

Request

method
string | required
startPaymentTransaction
 
requestId
string | required
Transaction Request ID
 
targetType
string | required
paymentGatewayConverge
 
parameters
JSONObject | required
All relevant parameters for Stand Alone Refund transactions.
 
paymentGatewayId
string | required
Payment Gateway ID
Unique identifier of the payment gateway as returned in the openPaymentGateway transaction response.
transactionType
string | required
Transaction Type
Valid value: STANDALONE_REFUND
baseTransactionAmount
JSONObject | required
Refund Amount
Amount to refund to the credit card.
"baseTransactionAmount" : { "currencyCodeStr" : "USD", "amountInMinorUnits" : 1900 },
tenderType
string | required
Tender Type
Valid value: CARD

Example

Request
{
  "method" : "startPaymentTransaction",
  "requestId" : "2087889042",
  "targetType" : "paymentGatewayConverge",
  "version" : "1.0",
  "parameters" : {
    "paymentGatewayId" : "9e908250-a4ab-48e4-a148-9b257ee8e861",
    "transactionType" : "STANDALONE_REFUND",
    "baseTransactionAmount" : {
      "value" : 2700,
      "currencyCode" : "USD"
    },
    "tenderType" : "CARD",
    "taxAmounts" : [{
      "value" : null,
    }],
  }
}
Response
  "requestId" : "2087889062",
  "statusDetails" : "REQUEST_ACCEPTED",
  "data" : {
    "paymentGatewayCommand" : {
      "completed" : true,
      "eventQueue" : [ ],
      "chanId" : "05b716ae-0dfc-451d-939a-a2c0fbcd5f74",
      "paymentTransactionData" : {
        "result" : "APPROVED",
        "authCode" : null,
        "date" : "Mon Mar 07 12:59:38 MST 2016",
        "cardEntryType" : "SWIPE",
        "resultMessage" : "APPROVED",
        "cardScheme" : "VISA",
        "amount" : {
          "currencyCode" : "USD",
          "value" : 2700
        },
        "id" : "070316A15-E1F66058-445C-4B86-B7E7-5F80B421D690",
        "transactionType" : "STANDALONE_REFUND",
        "approved" : "yes",
        "errors" : [ ],
        "maskedPan" : "******",
        "signatureBitmap" : {
          "data" : "`#*8_ H  !_ P  !_ P  !p` )'  )  )  !  0  !  (  )  (  1  )  1  (  1  )  0  1  )  H  8 _/ _#___ _'__^__^_____^__^__V__^__V__^__W__^__^__V________^___ _&_ X _'  ( _/  !  H  1  )  0  1  1  9  0  1  9  1  1  1  (  1  0  1  (  1  @  8 _'  (p`&*&  !  (  \"  (  !  (  )  (  )  8  )  0  8  8  0  8  0 _/  0 _/  ( _/ _& _/ _&__^ _'___ _'________^_____^________^_________ _'__^ _'___ _& _&p`*&E _'_ X _'p`.)E_ P _'_ X_______________________^_________ _&______ _% _' _/ _'  ( _' _/  8  ( _/  1  8  )  1  (  )  1  )  )  *  )  *  )  \"  )  $  #  \"  \"_ Y  !_ Y  !_ X  !_ Y_ X  !p`1)7_ X____ X____ P_______ X_______ X _'_ X _'________W___ _'__^___ _& _' _/ _/  0 _7  @  @  1  0  9  1  9  1  9  1  1  2  1  )  2  )  )  *  #  )_ Z  \"_ Y_ Z_ Y_ Y_ Q_ R_ Q_ H_ Q_ 0_ 0__Op",
          "format" : "SIG_BIN_2"
        },
        "tenderType" : "CARD",
        "balanceDue" : {
          "currencyCode" : "UNKNOWN",
          "value" : 0
        }
      }
    }
  }
}

Java

  1. Initialize Commerce SDK and receive an ECLAccountInterface instance named account.

  2. Create a money object by specifying a currency code and an amount.

    ECLMoney amount = new ECLMoney(ECLCurrencyCode.USD, 300L);
  3. Create a transaction reference.

    ECLStandaloneRefundTransactionInterface transaction = account.getTransactionProcessor().createStandaloneRefundTransactionWithTotal(amount);

Objective-C

  1. Initialize Commerce SDK and receive an ECLAccountInterface instance named account.

  2. Create a money object by specifying a currency code and an amount.

    ECLMoney *amount = [[ECLMoney alloc] initWithMinorUnits:200 withCurrencyCode:ECLCurrencyCode_USD];
  3. Create a transaction protocol.

    id<ECLTransactionProtocol> transaction = [[_account transactionProcessor] createStandaloneRefundTransactionWithTotal:amount];

C#

Request

PaymentArgs bea = new PaymentArgs();
Money m = new Money(Money.CurrencyCodefromString("USD"), myAmount);
bea.baseTransactionAmount = m;
bea.tenderType = TenderType.CARD;            
bea.transactionType = TransactionType.STANDALONE_REFUND;
bea.paymentGatewayId = m_PaymentGatewayId; 

m_CWS.StartPaymentTransaction(bea, MyNotifyCWSEvent, MyPaymentComplete);