Skip to content
Advertisement

Authorize.Net API limit 1000 results. How to overcome it?

On my website we keep transactions as pending and capture them when we ship (often we need to change amounts/cancel and it makes it easier accounting wise to work like that).

When we are ready to ship, we match all specified orders (with specified order status) with the invoice#/order id in authorize.

the issue is that the authorize.net API only allows for 1000 transaction limit so when using their GetUnsettledTransactionListRequest function it is missing transactions that are unsettled passed that amount.

I am able to set the paging limit to 1000 and I can also set the offset to 1000 (or 999 not sure which yet) so I think what I need to do is something like check if the array storing the results size is 1000 and if so get the next 1000 results to store in the array. But about about the next loop do I have to manually say 3000, 4000, 5000 (we don’t have that many transactions but still).

here is my current code:

JavaScript

Advertisement

Answer

GetUnsettledTransactionListRequest offers the ability to page the results. So you after you process the first 1,000 results you can request the next 1,000 results.

I don’t use the Authnet SDK but it looks like you can use AnetAPIPagingType() to handle the paging for you:

JavaScript

The JSON would resemble this:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement