Integration and Testing

Authorize.Net API questions and help with your payment integration.

Regular Contributor
Posts: 74
Registered: ‎03-21-2017

Duplicate Transaction error

I have used accept hosted payment form with iFrame integration.


We are doing some regression testing with sandbox account with live mode.


I have entered credit card information in iFrame but 'accidentally' put in the wrong card code, i got the error message 'transaction declined', then I fixed the card code and re-submit same payment from with same session and payment token.


On that second submission I'm getting the duplicate transaction error.


My understanding is if we found card number  or ccv code  in-correct then after correction, transcation should successfully placed without giveing duplicate tranaction error.



I am not sure whether it is expcted behaviour and my understanding wrong.


Can anyone pleae hlep me on this ?

Posts: 102
Registered: ‎06-26-2018

Re: Duplicate Transaction error



The fields which are validated for a duplicate transaction are as follows:


API Login ID
Credit Card Number

Expiration Date

Transaction Type

Bank Account Number

Routing Number

Purchase Order Number


Invoice Number

Customer ID

First Name

Last Name





Postal Code


The card code value is not included in validation of a duplicate transaction, however the credit card number is. 


When a transaction is unsuccessful due to the card code value being submitted with an incorrect value, you will need to change one of the above fields in some manner before submitting again or adjust the duplicate window setting value to your specified needs and including this in your getHostedPaymentPageRequest. 


Hhere is a working example of including the duplicate window value in a getHostedPaymentPageRequest


<getHostedPaymentPageRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">










                                           <description>Product Description</description>






                                                          <description>Cannes logo </description>







                                           <name>level2 tax name</name>

                                           <description>level2 tax</description>




                                           <name>duty name</name>

                                           <description>duty description</description>




                                           <name>level2 tax name</name>

                                           <description>level2 tax</description>










                                           <address>14 Main Street</address>

                                           <city>Pecan Springs</city>








                                           <company>Thyme for Tea</company>

                                           <address>12 Main Street</address>

                                           <city>Pecan Springs</city>






































                                           <settingValue>{"show": false, "required":false}</settingValue>




                                           <settingValue>{"show": false, "required":false}</settingValue>




                                           <settingValue>{"text": "Pay"}</settingValue>









I hope this information is helpful to you.


Thank you,


Regular Contributor
Posts: 56
Registered: ‎08-01-2013

Re: Duplicate Transaction error

Excuse me. But why the hell isn't this in the API? I used that API as a guide and I expect ALL settings to be in there. Now I released our product, the duplicate window is not 0, so my customers they are having issues with submitting the form when they get their CCV wrong. Which also it's stupid not including CCV in that duplicate window list.





I can't even auto-complete it in the library because it's a magic word in a JSON object. Here's the code to help others:


TransactionRequestType transactionRequest = new TransactionRequestType();

SettingType duplicateWindow = new SettingType();
duplicateWindow.setSettingValue( "0" );

ArrayOfSetting transactionSettingsList = new ArrayOfSetting();
transactionRequest.setTransactionSettings( transactionSettingsList );


It's not in the API:


Or the guide:


Or even in your github:


It's in a damn forum post.