Convert Auth Only to Sale

This transaction converts the previous authorization to a Sale and places the transaction into an Open batch for settlement. The transaction status will not change as the pended Pre-Auth will only be converted to a pended Sale.

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 Pre-Auth Complete 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: PRE_AUTH_COMPLETE
originalTransId
string | required
Transaction ID
Unique transaction identifier of the pre-authorized transaction.
Important: The status of the Pre-Auth transaction must be Open.
baseTransactionAmount
JSONObject | required
Transaction Amount
If not passed, the Pre-Auth will be converted to a Sale for fully authorized amount.
If passed, the Pre-Auth will be converted to a Sale for the amount that was passed as part of the Pre-Auth Complete
Important: The transaction amount must not be greater than the original authorized amount.
"baseTransactionAmount" : { "currencyCodeStr" : "USD", "amountInMinorUnits" : 1900 },
tenderType
string | required
Tender Type
Valid value: CARD

Example

Request
 {
  "method" : "startPaymentTransaction",
  "requestId" : "19183389",
  "targetType" : "paymentGatewayConverge",
  "version" : "1.0",
  "parameters" : {
    "paymentGatewayId" : "fa4742cc-f370-425f-92b7-35010a05c0ef",
    "transactionType" : "PRE_AUTH_COMPLETE",
    "originalTransId" : "070316A15-55BFC2A6-5210-4641-BE1E-B3D06259C3DD",
    "baseTransactionAmount" : {
      "value" : 3427,
      "currencyCode" : "USD"
    },
    "tenderType" : "CARD",
    "cardType" : null,
    "isTaxInclusive" : false,
    "taxAmounts" : [{
      "value" : 0,
      "currencyCode" : "USD"
    }],
  }
}
Response
{
  "requestId" : "19183391",
  "statusDetails" : "REQUEST_ACCEPTED",
  "data" : {
    "paymentGatewayCommand" : {
      "completed" : true,
      "eventQueue" : [ ],
      "chanId" : "91c12045-2764-4452-8583-67895fc674fc",
      "paymentTransactionData" : {
        "result" : "APPROVED",
        "authCode" : "******",
        "date" : "Mon Mar 07 13:08:16 MST 2016",
        "cardEntryType" : "UNKNOWN",
        "resultMessage" : "APPROVED",
        "cardScheme" : "VISA",
        "amount" : {
          "currencyCode" : "USD",
          "value" : 3427
        },
        "id" : "070316A15-55BFC2A6-5210-4641-BE1E-B3D06259C3DD",
        "transactionType" : "PRE_AUTH_COMPLETE",
        "approved" : "yes",
        "errors" : [ ],
        "maskedPan" : "******",
        "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. Add the unique transaction identifier of the pre-authorized transaction and create a transaction reference.

    String originalTxnId = "abc123";
    ECLTransactionInterface transaction = account.getTransactionProcessor().createPreAuthCompleteTransactionWithTotal(amount, originalTxnId);
  4. Create a card tender instance.

    ECLCardTenderInterface tender = account.getTransactionProcessor().createCardTender();

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. Add the unique transaction identifier of the pre-authorized transaction and create a transaction protocol.

    NSString *originalTxnId = @"abc123";
    id<ECLTransactionProtocol> transaction = [[_account transactionProcessor] createPreAuthCompleteTransactionWithTotal:amount transactionID:originalTxnId];
  4. Create a card tender instance.

    id<ECLCardTenderProtocol> tender = [account.transactionProcessor createCardTender];

C#

Request

PaymentArgs bea = new PaymentArgs();

Money m = new Money(Money.CurrencyCodefromString("USD"), finalAmount);
bea.baseTransactionAmount = m;  
bea.transactionType = TransactionType.PRE_AUTH_COMPLETE;
bea.originalTransId = m_OriginalTransId;
bea.tenderType = TenderType.CARD;
bea.paymentGatewayId = m_PaymentGateId; 

m_CWS.StartPaymentTransaction(bea, MyNotifyCWSEvent, MyPaymentComplete);