<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Get all Subscriptions list in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Get-all-Subscriptions-list/m-p/60753#M35265</link>
    <description>&lt;P&gt;I am also working on this issue; this is being coded in PHP using the following function:&lt;/P&gt;&lt;PRE&gt;use net\authorize\api\contract\v1 as AnetAPI;
use net\authorize\api\controller as AnetController;
require_once __DIR__ . '/includes/config.php';
require_once __DIR__ . '/includes/functions.php';
require_once __DIR__ . '/includes/anet_php_sdk/vendor/autoload.php';
$testing = 'TRUE';
//$testing = 'FALSE';

function getSubscriptionsList($searchtype, $pagenum, $testing){

	// Common Set Up for API Credentials
    $merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
    $merchantAuthentication-&amp;gt;setName(MERCHANT_LOGIN_ID);
    $merchantAuthentication-&amp;gt;setTransactionKey(MERCHANT_TRANSACTION_KEY);

    $refId = 'ref' . time();

    $sorting = new AnetAPI\ARBGetSubscriptionListSortingType();
    $sorting-&amp;gt;setOrderDescending(true);
    $sorting-&amp;gt;setOrderBy("id");
    
    $paging = new AnetAPI\PagingType();
    $paging-&amp;gt;setLimit("1000");
    $paging-&amp;gt;setOffset($pagenum);
	if ($testing == 'TRUE') {
	echo "&amp;lt;pre&amp;gt;";
	var_dump($paging);
	echo "&amp;lt;/pre&amp;gt;";
		
	}
    $request = new AnetAPI\ARBGetSubscriptionListRequest();
    $request-&amp;gt;setMerchantAuthentication($merchantAuthentication);
    $request-&amp;gt;setRefId($refId);
    $request-&amp;gt;setSearchType($searchtype);
    $request-&amp;gt;setSorting($sorting);
    $request-&amp;gt;setPaging($paging);

    $controller = new AnetController\ARBGetSubscriptionListController($request);

    $response = $controller-&amp;gt;executeWithApiResponse(Envir);

    if (($response != null) &amp;amp;&amp;amp; ($response-&amp;gt;getMessages()-&amp;gt;getResultCode() == "Ok")){
	if ($testing == 'TRUE') {
	echo "&amp;lt;pre&amp;gt;response-&amp;gt;getTotalNumInResultSet() is giving: ";
	var_dump($response-&amp;gt;getTotalNumInResultSet());
	echo "&amp;lt;/pre&amp;gt;";
	if( $testing == 'TRUE')
	{
		echo "&amp;lt;pre&amp;gt;Response:&amp;lt;br/&amp;gt;";
		var_dump($response);
		echo "&amp;lt;/pre&amp;gt;";			
	}
		
	}
        //if have subscriptions
        if( $response-&amp;gt;getTotalNumInResultSet() &amp;gt;=1 ){

            //$subscriptions = '';
            $subscriptions[] = $response-&amp;gt;getSubscriptionDetails();            
        } else{
			//$subscriptions = '';
		}
        return $subscriptions;

     }
    else
    {
        echo "ERROR :  Invalid response\n";
        $errorMessages = $response-&amp;gt;getMessages()-&amp;gt;getMessage();
        echo "Response : " . $errorMessages[0]-&amp;gt;getCode() . "  " .$errorMessages[0]-&amp;gt;getText() . "\n";
    }

} &lt;/PRE&gt;&lt;P&gt;When I run this through a while loop that sets page numbers from 1-4 and using the testing option to dump both the paging object and the Total number in result set I get the following responses:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;object(net\authorize\api\contract\v1\PagingType)#5 (2) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; ["limit":"net\authorize\api\contract\v1\PagingType":private]=&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; string(4) "1000"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; ["offset":"net\authorize\api\contract\v1\PagingType":private]=&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; int(1)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;response-&amp;gt;getTotalNumInResultSet() is giving: int(1881)&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;object(net\authorize\api\contract\v1\PagingType)#182 (2) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; ["limit":"net\authorize\api\contract\v1\PagingType":private]=&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; string(4) "1000"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; ["offset":"net\authorize\api\contract\v1\PagingType":private]=&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; int(2)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;response-&amp;gt;getTotalNumInResultSet() is giving: int(0)&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;object(net\authorize\api\contract\v1\PagingType)#3990 (2) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; ["limit":"net\authorize\api\contract\v1\PagingType":private]=&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; string(4) "1000"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; ["offset":"net\authorize\api\contract\v1\PagingType":private]=&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; int(3)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;response-&amp;gt;getTotalNumInResultSet() is giving: int(0)&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;object(net\authorize\api\contract\v1\PagingType)#3850 (2) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; ["limit":"net\authorize\api\contract\v1\PagingType":private]=&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; string(4) "1000"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; ["offset":"net\authorize\api\contract\v1\PagingType":private]=&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; int(4)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;response-&amp;gt;getTotalNumInResultSet() is giving: int(0)&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;It seems pretty obvious that the entire volume is being returned in the first loop iteration and that the 2nd through 4th iteration is doing nothing at all. What I am wondering is why?&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;Addendum: In test mode the search type is set to "subscriptionActive":&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;	if( $testing == 'TRUE')
	{
	$sdate	= date( 'Y-m-d', strtotime( "2017-01-01" ) );
	$edate  = date( 'Y-m-d', strtotime( "2017-11-30" ) );
	$searchtype = "subscriptionActive" ;
		
	}&lt;/PRE&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Dec 2017 12:53:34 GMT</pubDate>
    <dc:creator>DDCS</dc:creator>
    <dc:date>2017-12-06T12:53:34Z</dc:date>
    <item>
      <title>Get all Subscriptions list</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Get-all-Subscriptions-list/m-p/60570#M35095</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know&amp;nbsp;Get a List of Subscriptions function only return upto 1000 records and my client needs full list of subscripitons for reporting purpose.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are storing subscripiton id in our database, i tried "get a subscripiton" function to fetch subscripiton data one by one but this is not good approach and server timeout issues as we have around 2000 subscripitons.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please suggest suitable soluiton for this issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 05:30:44 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Get-all-Subscriptions-list/m-p/60570#M35095</guid>
      <dc:creator>jay71134</dc:creator>
      <dc:date>2017-11-20T05:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Get all Subscriptions list</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Get-all-Subscriptions-list/m-p/60571#M35096</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/21346"&gt;@jay71134&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should be able to get your desired records by utilizing the paging limit and offset parameters. You can also use orderBy to get records in specif order. If you can determine how many records your server will get before timing out, you could break your calls into batches.&lt;/P&gt;&lt;PRE&gt;&amp;lt;sorting&amp;gt;
      &amp;lt;orderBy&amp;gt;id&amp;lt;/orderBy&amp;gt;
      &amp;lt;orderDescending&amp;gt;false&amp;lt;/orderDescending&amp;gt;
   &amp;lt;/sorting&amp;gt;
   &amp;lt;paging&amp;gt;
      &amp;lt;limit&amp;gt;1000&amp;lt;/limit&amp;gt;
      &amp;lt;offset&amp;gt;1&amp;lt;/offset&amp;gt;
   &amp;lt;/paging&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Nov 2017 09:16:43 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Get-all-Subscriptions-list/m-p/60571#M35096</guid>
      <dc:creator>NexusSoftware</dc:creator>
      <dc:date>2017-11-20T09:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Get all Subscriptions list</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Get-all-Subscriptions-list/m-p/60572#M35097</link>
      <description>&lt;P&gt;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/21608"&gt;@NexusSoftware&lt;/a&gt;&amp;nbsp; Thank you for quick response.&amp;nbsp; I tried pagging with offset but it does not return anything.&amp;nbsp; I set limit to 1000 and offset 2 so we get 1001 to 2000 records. Any suggestion please.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 10:48:19 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Get-all-Subscriptions-list/m-p/60572#M35097</guid>
      <dc:creator>jay71134</dc:creator>
      <dc:date>2017-11-20T10:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get all Subscriptions list</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Get-all-Subscriptions-list/m-p/60573#M35098</link>
      <description>&lt;P&gt;When calling ARBGetSubscriptionListRequest, what are you specifying for the&amp;nbsp;searchType?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;ARBGetSubscriptionListRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"&amp;gt;
   &amp;lt;merchantAuthentication&amp;gt;
      &amp;lt;name&amp;gt;{API-LOGIN}&amp;lt;/name&amp;gt;
      &amp;lt;transactionKey&amp;gt;{TRANSACTION-KEY}&amp;lt;/transactionKey&amp;gt;
   &amp;lt;/merchantAuthentication&amp;gt;
   &amp;lt;refId&amp;gt;123456&amp;lt;/refId&amp;gt;
   &amp;lt;searchType&amp;gt;subscriptionActive&amp;lt;/searchType&amp;gt;
   &amp;lt;sorting&amp;gt;
      &amp;lt;orderBy&amp;gt;id&amp;lt;/orderBy&amp;gt;
      &amp;lt;orderDescending&amp;gt;false&amp;lt;/orderDescending&amp;gt;
   &amp;lt;/sorting&amp;gt;
   &amp;lt;paging&amp;gt;
      &amp;lt;limit&amp;gt;1000&amp;lt;/limit&amp;gt;
      &amp;lt;offset&amp;gt;1&amp;lt;/offset&amp;gt;
  &amp;lt;/paging&amp;gt;
&amp;lt;/ARBGetSubscriptionListRequest&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Nov 2017 12:12:59 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Get-all-Subscriptions-list/m-p/60573#M35098</guid>
      <dc:creator>NexusSoftware</dc:creator>
      <dc:date>2017-11-20T12:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Get all Subscriptions list</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Get-all-Subscriptions-list/m-p/60753#M35265</link>
      <description>&lt;P&gt;I am also working on this issue; this is being coded in PHP using the following function:&lt;/P&gt;&lt;PRE&gt;use net\authorize\api\contract\v1 as AnetAPI;
use net\authorize\api\controller as AnetController;
require_once __DIR__ . '/includes/config.php';
require_once __DIR__ . '/includes/functions.php';
require_once __DIR__ . '/includes/anet_php_sdk/vendor/autoload.php';
$testing = 'TRUE';
//$testing = 'FALSE';

function getSubscriptionsList($searchtype, $pagenum, $testing){

	// Common Set Up for API Credentials
    $merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
    $merchantAuthentication-&amp;gt;setName(MERCHANT_LOGIN_ID);
    $merchantAuthentication-&amp;gt;setTransactionKey(MERCHANT_TRANSACTION_KEY);

    $refId = 'ref' . time();

    $sorting = new AnetAPI\ARBGetSubscriptionListSortingType();
    $sorting-&amp;gt;setOrderDescending(true);
    $sorting-&amp;gt;setOrderBy("id");
    
    $paging = new AnetAPI\PagingType();
    $paging-&amp;gt;setLimit("1000");
    $paging-&amp;gt;setOffset($pagenum);
	if ($testing == 'TRUE') {
	echo "&amp;lt;pre&amp;gt;";
	var_dump($paging);
	echo "&amp;lt;/pre&amp;gt;";
		
	}
    $request = new AnetAPI\ARBGetSubscriptionListRequest();
    $request-&amp;gt;setMerchantAuthentication($merchantAuthentication);
    $request-&amp;gt;setRefId($refId);
    $request-&amp;gt;setSearchType($searchtype);
    $request-&amp;gt;setSorting($sorting);
    $request-&amp;gt;setPaging($paging);

    $controller = new AnetController\ARBGetSubscriptionListController($request);

    $response = $controller-&amp;gt;executeWithApiResponse(Envir);

    if (($response != null) &amp;amp;&amp;amp; ($response-&amp;gt;getMessages()-&amp;gt;getResultCode() == "Ok")){
	if ($testing == 'TRUE') {
	echo "&amp;lt;pre&amp;gt;response-&amp;gt;getTotalNumInResultSet() is giving: ";
	var_dump($response-&amp;gt;getTotalNumInResultSet());
	echo "&amp;lt;/pre&amp;gt;";
	if( $testing == 'TRUE')
	{
		echo "&amp;lt;pre&amp;gt;Response:&amp;lt;br/&amp;gt;";
		var_dump($response);
		echo "&amp;lt;/pre&amp;gt;";			
	}
		
	}
        //if have subscriptions
        if( $response-&amp;gt;getTotalNumInResultSet() &amp;gt;=1 ){

            //$subscriptions = '';
            $subscriptions[] = $response-&amp;gt;getSubscriptionDetails();            
        } else{
			//$subscriptions = '';
		}
        return $subscriptions;

     }
    else
    {
        echo "ERROR :  Invalid response\n";
        $errorMessages = $response-&amp;gt;getMessages()-&amp;gt;getMessage();
        echo "Response : " . $errorMessages[0]-&amp;gt;getCode() . "  " .$errorMessages[0]-&amp;gt;getText() . "\n";
    }

} &lt;/PRE&gt;&lt;P&gt;When I run this through a while loop that sets page numbers from 1-4 and using the testing option to dump both the paging object and the Total number in result set I get the following responses:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;object(net\authorize\api\contract\v1\PagingType)#5 (2) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; ["limit":"net\authorize\api\contract\v1\PagingType":private]=&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; string(4) "1000"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; ["offset":"net\authorize\api\contract\v1\PagingType":private]=&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; int(1)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;response-&amp;gt;getTotalNumInResultSet() is giving: int(1881)&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;object(net\authorize\api\contract\v1\PagingType)#182 (2) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; ["limit":"net\authorize\api\contract\v1\PagingType":private]=&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; string(4) "1000"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; ["offset":"net\authorize\api\contract\v1\PagingType":private]=&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; int(2)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;response-&amp;gt;getTotalNumInResultSet() is giving: int(0)&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;object(net\authorize\api\contract\v1\PagingType)#3990 (2) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; ["limit":"net\authorize\api\contract\v1\PagingType":private]=&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; string(4) "1000"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; ["offset":"net\authorize\api\contract\v1\PagingType":private]=&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; int(3)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;response-&amp;gt;getTotalNumInResultSet() is giving: int(0)&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;object(net\authorize\api\contract\v1\PagingType)#3850 (2) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; ["limit":"net\authorize\api\contract\v1\PagingType":private]=&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; string(4) "1000"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; ["offset":"net\authorize\api\contract\v1\PagingType":private]=&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;&amp;nbsp; int(4)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier,monospace" size="2" color="#0000FF"&gt;response-&amp;gt;getTotalNumInResultSet() is giving: int(0)&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;It seems pretty obvious that the entire volume is being returned in the first loop iteration and that the 2nd through 4th iteration is doing nothing at all. What I am wondering is why?&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;Addendum: In test mode the search type is set to "subscriptionActive":&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;	if( $testing == 'TRUE')
	{
	$sdate	= date( 'Y-m-d', strtotime( "2017-01-01" ) );
	$edate  = date( 'Y-m-d', strtotime( "2017-11-30" ) );
	$searchtype = "subscriptionActive" ;
		
	}&lt;/PRE&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 12:53:34 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Get-all-Subscriptions-list/m-p/60753#M35265</guid>
      <dc:creator>DDCS</dc:creator>
      <dc:date>2017-12-06T12:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Get all Subscriptions list</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Get-all-Subscriptions-list/m-p/60777#M35289</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;ARBGetSubscriptionListRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"&amp;gt;
   &amp;lt;merchantAuthentication&amp;gt;
      &amp;lt;name&amp;gt;5KP3u95bQpv&amp;lt;/name&amp;gt;
      &amp;lt;transactionKey&amp;gt;346HZ32z3fP4hTG2&amp;lt;/transactionKey&amp;gt;
   &amp;lt;/merchantAuthentication&amp;gt;
   &amp;lt;refId&amp;gt;123456&amp;lt;/refId&amp;gt;
   &amp;lt;searchType&amp;gt;subscriptionActive&amp;lt;/searchType&amp;gt;
   &amp;lt;sorting&amp;gt;
      &amp;lt;orderBy&amp;gt;id&amp;lt;/orderBy&amp;gt;
      &amp;lt;orderDescending&amp;gt;false&amp;lt;/orderDescending&amp;gt;
   &amp;lt;/sorting&amp;gt;
   &amp;lt;paging&amp;gt;
      &amp;lt;limit&amp;gt;1000&amp;lt;/limit&amp;gt;
      &amp;lt;offset&amp;gt;1&amp;lt;/offset&amp;gt;
   &amp;lt;/paging&amp;gt;
&amp;lt;/ARBGetSubscriptionListRequest&amp;gt;&lt;/PRE&gt;&lt;P&gt;While trying this API out on the developer reference website:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.authorize.net/api/reference/index.html#recurring-billing-get-a-list-of-subscriptions" target="_blank"&gt;https://developer.authorize.net/api/reference/index.html#recurring-billing-get-a-list-of-subscriptions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the following response&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt; 
&amp;lt;ARBGetSubscriptionListResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"&amp;gt;
  &amp;lt;refId&amp;gt;
    123456
  &amp;lt;/refId&amp;gt;
  &amp;lt;messages&amp;gt;
    &amp;lt;resultCode&amp;gt;
      Ok
    &amp;lt;/resultCode&amp;gt;
    &amp;lt;message&amp;gt;
      &amp;lt;code&amp;gt;
        I00001
      &amp;lt;/code&amp;gt;
      &amp;lt;text&amp;gt;
        Successful.
      &amp;lt;/text&amp;gt;
    &amp;lt;/message&amp;gt;
  &amp;lt;/messages&amp;gt;
  &amp;lt;totalNumInResultSet&amp;gt;
    11629
  &amp;lt;/totalNumInResultSet&amp;gt;
  &amp;lt;subscriptionDetails&amp;gt;
      ....
  &amp;lt;/subscriptionDetails&amp;gt;
&amp;lt;/ARBGetSubscriptionListResponse&amp;gt;&lt;/PRE&gt;&lt;P&gt;This indicates that with the offset of 1 and limit of 1000, the result would contain records 1-1000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, the offset of 2 and limit of 1000, the result would contain records 1001-2000.&lt;/P&gt;&lt;P&gt;Similarly, offset 3 limit 1000, -&amp;gt; result records 2001-3000 and so on. The final result set with be with offset 12 limit 1000 -&amp;gt; records 11001 - 11629&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However all calls having offset greater than 1 have this in the response.&lt;/P&gt;&lt;PRE&gt;  &amp;lt;totalNumInResultSet&amp;gt;
    0
  &amp;lt;/totalNumInResultSet&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;This just means the count is only returned in the first offset API call. But this doesn't mean that you are getting no records in each subsequent offset call. The records are still fetched correctly.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 11:57:23 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Get-all-Subscriptions-list/m-p/60777#M35289</guid>
      <dc:creator>akagarwa</dc:creator>
      <dc:date>2017-12-07T11:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Get all Subscriptions list</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Get-all-Subscriptions-list/m-p/60782#M35293</link>
      <description>&lt;P&gt;Yes, that was absolutely it. Thanks for the helping hand.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 15:34:53 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Get-all-Subscriptions-list/m-p/60782#M35293</guid>
      <dc:creator>DDCS</dc:creator>
      <dc:date>2017-12-07T15:34:53Z</dc:date>
    </item>
  </channel>
</rss>

