Integration and Testing

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

Reply
Member
Posts: 3
Registered: ‎11-09-2021

Idempotency Protection for payment requests

Does Authorize.net's API offer idempotency protection in some form?

I've seen idempotency protection in the form of unique ids in headers (e.g. Stripe), or in the form of some behind-the-scenes heuristics (i.e. Repay).

Posts: 34
Kudos: 2
Solutions: 4
Registered: ‎07-28-2014

Re: Idempotency Protection for payment requests

Hi @DennisDang,

 

Authorize.net offer a duplicateWindow setting that can be set up to 8hours, this will prevent processing duplicate transactions within the set window. Read more on the Payment Transaction Developer Guide (Transaction Settings -> duplicateWindow), duplicate transactions requests will return error code 11.

 

Thanks

-Mansour 

Member
Posts: 3
Registered: ‎11-09-2021

Re: Idempotency Protection for payment requests

Thank you @MansourH. I didn't realize I had double-posted. Sorry.

 

What data are you using to deduplicate? Is it a conglomerate of things?  In addition to setting the duplicateWindow time, is there a unique constraint of sorts on txn refIds? If that's the case, I imagine duplicateWindow + unique refIds will serve me well enough.

Posts: 34
Kudos: 2
Solutions: 4
Registered: ‎07-28-2014

Re: Idempotency Protection for payment requests

There are a bunch of fields that are validated for duplicate requests, I've included a link to error code 11 that list these fields:

 

https://developer.authorize.net/api/reference/responseCodes.html?code=11 

 

Thanks

-Mansour