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();
Solved! Go to Solution.
10-17-2018 03:28 AM
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
10-17-2018 01:34 PM
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.
10-17-2018 04:50 AM
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
10-17-2018 01:34 PM
So, would you know the best solution for this situation:
08-09-2019 07:24 AM