Soap API v1.2


Search previously settled batches, return only counts


Identical to the searchBatches method except only the batch counts are returned. Like searchBatches, this method returns BatchSearchResult. The only difference is that BatchSearchResult.Batches is left empty. This method provides a quicker way to determine the size of the result set before starting to retrieve the full search results.

See also searchBatches, getBatchStatus, closeBatch, getBatchTransactions


BatchSearchResult searchBatchesCount ( ueSecurityToken Token, SearchParam Search, boolean MatchAll, integer Start, integer Limit, string Sort)


Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and validate transaction.
SearchParam Search Array of search parameters
boolean MatchAll If set to “true,” only results matching all search criteria will be returned, if set to “false,” results matching any of the search criteria will be returned.
integer Start Index to start returning batches from.
integer Limit Max number of batches to return in result set.
string Sort Field name to sort the results by

Return Value

BatchSearchResult Returns the result of the batch search based on the search parameters set.



For directions on how to set up the WSDL link, create “$token” and “$client”, go to PHP Soap How-to.

try {
// make sure you have prepared data to search on
catch (SoapFault $e) {
  echo $client->__getLastRequest();
  echo $client->__getLastResponse();
  die("Search batches failed failed :" .$e->getMessage());


This example uses the USAePay Java library. For directions on how to install the library and create the token/client objects, go to either the Java JAX-RPC Howto or the Java JAX-WS Howto.

try {
SearchParamArray searchParams = new SearchParamArray();
searchParams.add(new SearchParam("Sequence","eq", "123456"));
BigInteger start = new BigInteger("0");
BigInteger limit = new BigInteger("9999999");
BatchSearchResult BatchResult = new BatchSearchResult();
BatchResult = client.searchBatchesCount(token, searchParams, true, start, limit, "Sequence");
} catch (Exception e) {
    System.out.println("Soap Exception: " + e.getMessage());


<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="" 
xmlns:ns1="urn:usaepay" xmlns:xsd="" 
<Token xsi:type="ns1:ueSecurityToken">
<ClientIP xsi:type="xsd:string"></ClientIP>
<PinHash xsi:type="ns1:ueHash">
<HashValue xsi:type="xsd:string">3b129d9b5229387ad6b5e2e6af0abbab441b1153</HashValue>
<Seed xsi:type="xsd:string">11937833911067914168</Seed>
<Type xsi:type="xsd:string">sha1</Type>
<SourceKey xsi:type="xsd:string">HB4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT</SourceKey>
<Search SOAP-ENC:arrayType="ns1:SearchParam[1]" xsi:type="ns1:SearchParamArray">
<item xsi:type="ns1:SearchParam">
<Field xsi:type="xsd:string">closed</Field>
<Type xsi:type="xsd:string">gt</Type>
<Value xsi:type="xsd:string">2007-04-01</Value>
<MatchAll xsi:type="xsd:boolean">true</MatchAll>
<Start xsi:type="xsd:integer">0</Start>
<Limit xsi:type="xsd:integer">5</Limit>
<Sort xsi:type="xsd:string">closed</Sort>

Change History

Version Change
1.2 Method added in soap 1.2 release
developer/soap/methods/searchbatchescount.txt · Last modified: 2009/09/17 09:55 by charlie

Page Tools