5

As described in the doc (https://developer.paypal.com/webapps/developer/docs/classic/api/merchant/TransactionSearch_API_Operation_SOAP/), "The maximum number of transactions that can be returned from a TransactionSearch API call is 100."

So what is the recommended approached if I want to page through all the results? I suppose I could shorten the time rage until it fits less than 100 results but that's really lame...

Clement
  • 3,990
  • 4
  • 43
  • 44

1 Answers1

19

When transaction search has more than 100 transaction, PayPal sends 100 transaction with ACK as SuccessWithWarning.

When you get ACK = SuccessWithWarning, get timestamp of last transaction from the result. Now make another transaction search call with STARTDATE equal to last transaction's timestamp.

Continue till you get ACK = Success.

Hope this helps.

Chirag B
  • 2,106
  • 2
  • 20
  • 35
  • That sounds reasonable and I will try that, but, is it actually documented anywhere? – Clement May 02 '13 at 03:56
  • I think I found it actually: https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/ht_searchRetrieveTransactionData-curl-etc/ – Clement May 02 '13 at 03:59
  • 2
    In my Case, Paypal-NVP returns the newest items for the selected timespan, so i have to set the enddate to the last items date, but it works - only backwards. – bhelm Feb 07 '14 at 15:09
  • If you do this, you get the "last" transaction twice (clearer: all transactions in the same second of the last fetched transaction). You have to take care that this is not a problem. PayPals date format does not include milliseconds, therefore you only can hope that your business does not receive more than 100 transactions in two seconds ;-) – Frank Olschewski May 22 '14 at 13:38
  • 1
    More specifically, if you get L_ERRORCODE0 == 11002, then the results have been truncated. There could be other causes for ACK=SuccessWarning – Steven P Aug 12 '16 at 05:20