The referenced transaction does not meet the criteria for issuing a credit

Question:

I try to make a refund transaction via my django app using code:

class Handler():

    def __init__(self):
        self.initial_values = {
            'x_login': settings.API_LOGIN,
            'x_tran_key': settings.TRANS_KEY,
            'x_delim_data': 'TRUE',
            'x_relay_response': 'FALSE',
            'x_version': '3.1',
        }

    def send_AIM_credit(self, amount):
        self.amount = amount
        self.additional_values = {
            'x_type': 'CREDIT',
            'x_card_num': '370000000000002',
            'x_amount': '123',
            'x_description': "Refund",
            'x_trans_id': 'someid'
        }
        result = self.__send_AIM_request() 
        if result[0] in ['3', '2']:
            raise Exception("ERROR %s" % result[2], result[3])
        return result 

    def __send_AIM_request(self):
        self.initial_values.update(self.additional_values)
        logging.info(self.initial_values)
        params_string = urllib.urlencode(self.initial_values)
        response = urllib2.urlopen(settings.AIM_URL, params_string).read()
        response_list = response.split(',')
        logging.info(response_list)
        return response_list

I am sure that transaction which I want to refund is allowed to do that because i have refund option in authorize.net website for it. Why I cannot do that in my app? maybe something is missing?

AIM_URL = 'https://test.authorize.net/gateway/transact.dll'

Moreover in documentation i read that I don`t need full card number for credit transaction, only last 4 digits. But when I use only last 4 digits I get response that transaction cannot be found

Asked By: szaman

||

Answers:

Refunds can only be performed through Authorize.Net if the original transaction is less then 6 months old and the amount is equal to or less then the original purchase amount. If it does not meet this criteria you cannot issue that refund.

edit

FYI, setting x_test_request = TRUE means the transaction was only a test and not actually processed.

Answered By: John Conde

The problem was with security keys which I use to communicate with authorize.net I was able to make transactions but not to refund them. When I generated new keys the problem disappeared.

Answered By: szaman

This might also be if the transaction is very new and hasn’t been settled. In this case you’ll want to VOID the transaction instead.

Answered By: leech

from:

https://support.authorize.net/authkb/index?page=content&id=A567

i have found that:

  • Refunds cannot be processed on transactions older than 120 days.

so i think the 6 months has been modified and is currently incorrect. i tried issuing a REFUND for a transaction 122 days old, and i got the error message listed above.

Answered By: pRose_la

Have the same problem with my test account. I can’t refund transaction created few minutes ago. You should login into your sandbox account and go to account settings -> test mode -> transaction processing set ‘Test’ it was ‘Live’ in my case. Than transaction refunded success.

Answered By: Yurii Hierasin

I found that submitting a refund where the cardnumber string contains a credit card number AND the refTransID string contains the Auth.net TransId will produce the same error message. If the same transaction is submitted with no value in refTransID it will work.

I literally submitted the trans with this line commented out and it worked!

//refTransId = CreditCardTransId,
Answered By: Ken V
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.