SDK Authorization Reversal

Document created by gjsissons on May 6, 2016Last modified by gjsissons on May 6, 2016
Version 3Show Document
  • View in full screen mode

The primary use of Authorization Reversal transactions is to eliminate any unused amount on an unexpired Authorization. Issuing an Authorization Reversal has the benefit of freeing any remaining held amount that reduces the buying power of your customer. This potentially both increases customer satisfaction and can allow them to proceed with additional purchases that may otherwise be blocked by credit limits. It also helps reduce the possibility that fees might be imposed by the card associations for mis-use of Authorizations.

 

Note: For American Express transactions, the reversal amount must match the authorization amount. Partial reversals and reversals against remaining amount after a partial capture are not allowed. Attempts to perform these types of reversals result in a Response Code of 336 - Reversal amount does not match Authorization amount.

 

 

PHP example

 

<?php
require_once realpath(dirname(__FILE__)) . '/../lib/LitleOnline.php';

#Auth Reversal
#litleTxnId contains the Litle Transaction Id returned on the authorization

$authRev_info = array(
  'litleTxnId'=>'350000000000000001',
  'id'=> '456'
);

$initilaize = &new LitleOnlineRequest();
$reversalResponse = $initilaize->authReversalRequest($authRev_info);
#display results
echo ("Response: " . (XmlParser::getNode($reversalResponse,'response')) . "<br>");
echo ("Message: " . XmlParser::getNode($reversalResponse,'message') . "<br>");
echo ("Litle Transaction ID: " . XmlParser::getNode($reversalResponse,'litleTxnId'));
?>

Java example

 

import com.litle.sdk.*;
import com.litle.sdk.generate.*;

public class AuthReversalExample {
    public static void main(String[] args) {
        AuthReversal authReversal = new AuthReversal();
        //litleTxnId contains the Litle Transaction Id returned on the auth
        authReversal.setLitleTxnId(100000000000000001L);
        AuthReversalResponse response = new LitleOnline().authReversal(authReversal);
        //Display Results
        System.out.println("Response: " + response.getResponse());
        System.out.println("Message: " + response.getMessage());
        System.out.println("Litle Transaction ID: " + response.getLitleTxnId());
    }
}

 

.NET example

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Litle.Sdk;

//Auth Reversal Transaction
class Example
{
        [STAThread]
         public static void Main(String[] args)
         {
             LitleOnline litle = new LitleOnline();
             authReversal reversal = new authReversal();
             //litleTxnId contains the Litle Transaction Id returned on the auth
             reversal.litleTxnId = 1000000000000000000;
             authReversalResponse reversalResponse = litle.AuthReversal(reversal);
             //Display Results
             Console.WriteLine("Response: " + reversalResponse.response);
             Console.WriteLine("Message: " + reversalResponse.message);
             Console.WriteLine("Litle Transaction Id: " + reversalResponse.litleTxnId);
             Console.ReadLine();
         }
}

 

 

Ruby example

 

require 'LitleOnline'
include LitleOnline

#Auth Reversal
#litleTxnId contains the Litle Transaction Id returned on the authorization
reversal_info = {'litleTxnId' => '100000000000000001'}
reversal_response = LitleOnlineRequest.new.auth_reversal(reversal_info)

#display results
puts "Response: " + reversal_response.reversalResponse.response
puts "Message: " + reversal_response.reversalResponse.message
puts "Litle Transaction ID: " + reversal_response .reversalResponse.litleTxnId

Attachments

    Outcomes