cancel
Showing results for 
Search instead for 
Did you mean: 

Transactions that fail AVS still have ResponseCode OK

Hello,

 

If we setup AVS rules, the transcations done via the API still come with resultCode = OK, but the other transaction fields have the correct values: 

 

transactionResponse.avsResultCode 

and 

transactionResponse.acvvResultCode 

 

And so, the developer has to duplicate the rejecting logic... say you have a certain combination for rejection, set in the Authorize.Net dashboard, then we have to check in our code as well... because simply relying on the transaction resultCode, is not enough.

 

Is there a setting or global field on the transcation Response object, that we can check to see it the transaction was overall rejected / failed ?

 

 

Hopefully this makes sense! 

 

Thanks @RichardH !

andronachev2016
Contributor
2 REPLIES 2

@andronachev2016 You don't mention which API call you use, but I'll presume you're using createTransactionRequest.

The resultCode element indicates the status of the API call. It does not indicate anything regarding the transaction in question.

 

The responseCode element under transactionResponse, in contrast, indicates the status of the transaction.

A responseCode of 1 means the transaction was successful, while 2 indicates a decline (whether due to AVS, CVV, or card issuer refusal) and 3 indicates a transaction processing error. (If you use the Advanced Fraud Detection Suite and have any of its filters set up to hold transactions for review, you can expect a 4 when a transaction is held for review.)

So to check for a successful transaction, you will want an resultCode of "Ok" and a responseCode of 1.

--
"Move fast and break things," out. "Move carefully and fix what you break," in.
Lilith
Administrator Administrator
Administrator

Hi Lilith,

 

You're right - thanks ! .. however, as feedback from an integrator, the response is really weird to handle... I mean you have:  

 

1) resultCode on the response.message.resultCode property

2) responseCode on the response.transactionResponse property

3) messages array on both response.message & response.transactionResponse 

4) errors array on response.transactionResponse 

 

And this is only for createTransactionRequest ... I don't know what I'd do if I had to do more complex tasks. 

 

It's a nightmare ! why can't there just be a single flag with ResponseCode & then a list of errors ?

 

Anyway. many thanks; have a great day! 

andronachev2016
Contributor