cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Always The sum of credits against the referenced transaction would exceed original debit amount.

hi Team,

I am using sandbox account  and i tried to do refund Call for Settled Transaction. but evenry time i am getting error code 51 with error text The sum of credits against the referenced transaction would exceed original debit amount.

 

I am sending all correct values (Tran ID, Credit Card Num,Expiry date and Amount).Below is my code sample.

 

ApiOperationBase<ANetApiRequest, ANetApiResponse>.MerchantAuthentication = new merchantAuthenticationType()
{
name = objAPICred.APIUserName, //ApiLoginID,

Item = objAPICred.APISignature,// ApiTransactionKey
ItemElementName = ItemChoiceType.transactionKey,

};

var creditCard = new creditCardType
{
cardNumber = strCardNum,
expirationDate = "XXXX", 
};

 

 var paymentType = new paymentType { Item = creditCard };

 

 var paymentType = new paymentType { Item = creditCard }; var transactionRequest = new transactionRequestType
{
transactionType = transactionTypeEnum.refundTransaction.ToString(), // refund type
payment = paymentType,
amount = Convert.ToDecimal("1.00"), 
refTransId = "40020244370" 
};

   var request = new createTransactionRequest { transactionRequest = transactionRequest };

var controller = new createTransactionController(request);
controller.Execute();

 

Instancy2018
Member
1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Instancy2018, the errors 51 and 55 occur when you are trying to refund more money than the original transaction or what's left of it.

 

Let's say the original transaction was for $100. You can refund as many times as you want as long as the sum of all refunds is less than or equal to $100.

 

As soon as you cross $100, you will start seeing errors. That's because you're trying to give away money which is not part of the original transaction.

 

Hope this helps,

Gabriel

View solution in original post

3 REPLIES 3

Hi team,

 

I got this issue actually when i checked in sandbox portal under Transaction Search with status filter (Refund/Pending Settlement) . I found Refund record. As i am trying to call again Refund request for same transaction it giving me error code 55.

 

  

 

 

 

Instancy2018
Member

Hi @Instancy2018, the errors 51 and 55 occur when you are trying to refund more money than the original transaction or what's left of it.

 

Let's say the original transaction was for $100. You can refund as many times as you want as long as the sum of all refunds is less than or equal to $100.

 

As soon as you cross $100, you will start seeing errors. That's because you're trying to give away money which is not part of the original transaction.

 

Hope this helps,

Gabriel

So, would you know the best solution for this situation:

  • Customer places order for several items for $100 total. We do AUTH_ONLY at that time and save authorization ID.
  • We use CIM to charge customer CC at the time that items are shipped. So there are multiple transactions, which total up to $100. (using the Authorization ID would only apply to first transaction, so we use CIM to ensure all transactions go thru)
  • We need to refund entire order of $100. But there is no single transaction where the amount = $100.00
  • Do we need to use ECC, and supply the CustomerProfileID and CustomerPaymentID, instead of a "refTransID" in order for the refund to work?