Soap API v1.6


Search transactions and return only specific fields.


Use this method if you only need to view a few select fields of the transactions you are searching for. Since it will only return the fields you specify, it is more efficient than the searchTransactions method.

See also getTransaction, getTransactionStatus, getTransactionCustom, searchTransactions, getTransactionReport

Search, Sort and Return Fields

The following fields may be used in the SearchParam, Sort and FieldList parameters:

  • transactiontype
  • response.authcode
  • response.avsresult
  • response.avsresultcode
  • response.batchnum
  • response.batchrefnum
  • response.cardcoderesult
  • response.cardcoderesultcode
  • response.conversionrate
  • response.convertedamount
  • response.convertedamountcurrency
  • response.custnum
  • response.error
  • response.errorcode
  • response.refnum
  • response.result
  • response.resultcode
  • response.status
  • response.statuscode
  • checktrace.trackingnum
  • checktrace.effective
  • checktrace.processed
  • checktrace.settled
  • checktrace.returned
  • checktrace.banknote
  • datetime
  • accountholder
  • details.invoice
  • details.ponum
  • details.orderid
  • details.clerk
  • details.terminal
  • details.table
  • details.description
  • details.amount
  • details.currency
  • details.tip
  • details.nontax
  • details.shipping
  • details.subtotal
  • creditcarddata.cardtype
  • creditcarddata.cardnumber
  • creditcarddata.cardexpiration
  • creditcarddata.cardcode
  • creditcarddata.avsstreet
  • creditcarddata.avszip
  • creditcarddata.cardpresent
  • checkdata.checknumber
  • checkdata.routing
  • checkdata.account
  • checkdata.ssn
  • checkdata.driverslicense
  • checkdata.driverslicensestate
  • checkdata.recordtype
  • user
  • source
  • serverip
  • clientip
  • customerid
  • billingaddress.firstname
  • billingaddress.lastname
  • billingaddress.street
  • billingaddress.street2
  • billingaddress.state
  • billingaddress.fax
  • shippingaddress.firstname
  • shippingaddress.lastname
  • shippingaddress.street
  • shippingaddress.street2
  • shippingaddress.state
  • shippingaddress.fax


string searchTransactionsCustom ( ueSecurityToken Token, SearchParam Search, boolean MatchAll, integer Start, integer Limit, string FieldList, string Format, string Sort )


Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and validate transaction.
SearchParam Search Array of search parameters (SearchParam objects) available.
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 Sequence number to start returning on.
integer Limit Maximum number of transactions to return in result set.
string FieldList String Array of fields to return in search.
string Format Specify format of return data. Possible formats include: csv, tab, xml.
string Sort Field name to sort the results by

Return Value

string Base64 encode result set. Returns all of the fields from any transactions matching your search parameters.



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

try { 
// make sure you prep data to search on 
  $format ='csv'; 
  $sort = 'invoice';
catch(SoapFault $e) { 
  echo $client->__getLastResponse(); 
  die("Serach Transaction Failed :".$e->getMessage()); 


For directions on how to set up the WSDL link and create the “token” and “client” variables, go to the Visual Basic .Net Soap How-to.

        ' instantiate client
        Dim client As usaepay.usaepayService = New usaepay.usaepayService
        ' build security token using sourcekey and pin
        Dim token As usaepay.ueSecurityToken
        token = Me.CreateToken("982lz9VsLm87MA54Sv8E582h8OZMArL6", "443311")
        ' Search type is AND  (all search parameters must be matched)
        Dim MatchAll As Boolean
        MatchAll = True
        ' List of search parameters
        Dim searchParams(1) As usaepay.SearchParam
        searchParams(0) = New usaepay.SearchParam
        searchParams(0).Field = "Created"
        searchParams(0).Type = "gt"
        searchParams(0).Value = "2009-05-13 00:00:00"
        searchParams(1) = New usaepay.SearchParam
        searchParams(1).Field = "reccustid"
        searchParams(1).Type = "gt"
        searchParams(1).Value = "0"
        ' Result Record to start on
        Dim start As Integer
        start = 1
        ' List of fields to return
        Dim FieldList(2) As String
        FieldList(0) = "Response.RefNum"
        FieldList(1) = "Response.ResultCode"
        FieldList(2) = "CustomerID"
        ' limit to 10 results
        Dim limit As Integer
        limit = "10"
        Dim SearchResults As String
        SearchResults = client.searchTransactionsCustom(token, searchParams, MatchAll, 0, 1000, FieldList, "csv", "invoice")
        ' results are base64 encode
        Dim binaryData() As Byte
        binaryData = Convert.FromBase64String(SearchResults)


For directions on how to set up the WSDL link and create the “token” and “client” variables, go to the C Sharp .Net Soap How-to.

Boolean matchAll;
            matchAll = true;
            string[] fields = new string[3];
            usaepay.SearchParam[] search = new usaepay.SearchParam[2];
            search[0] = new usaepay.SearchParam();
            search[0].Field = "Created";
            search[0].Type = "Contains";
            search[0].Value = "2010-08-09";
            int start = 1;
            int limit = 10;
            string[] FieldList = new string[3];
            FieldList[0] = "Response.RefNum";
            FieldList[1] = "Response.ResultCode";
            FieldList[2] = "CustomerID";
            string result;
                result = client.searchTransactionsCustom(token, search, matchAll, "0", "10", FieldList,"csv", "invoice");
                Byte[] binaryData = new Byte[3];
                binaryData = Convert.FromBase64String(result);
            catch (Exception err)


<?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">11ac55b0a0b59f8f028dbf85bc32266fa973dd0e</HashValue>
<Seed xsi:type="xsd:string">12678150211876663375</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">amount</Field> 
<Type xsi:type="xsd:string">eq</Type> 
<Value xsi:type="xsd:string">29.00</Value> 
<MatchAll xsi:type="xsd:boolean">true</MatchAll> 
<Start xsi:type="xsd:integer">0</Start> 
<Limit xsi:type="xsd:integer">10</Limit> 
<FieldList SOAP-ENC:arrayType="xsd:string[5]" xsi:type="ns1:stringArray"> 
<item xsi:type="xsd:string">Response.AvsResult</item> 
<item xsi:type="xsd:string">Response.AvsResultCode</item> 
<item xsi:type="xsd:string">DateTime</item> 
<item xsi:type="xsd:string">Response.Error</item> 
<item xsi:type="xsd:string">Details.Invoice</item> 
<Format xsi:type="xsd:string">xml</Format> 
<Sort xsi:type="xsd:string">Details.Invoice</Sort> 

Change History

Version Change
1.2 Added Sort Parameter
1.1 Soap 1.1 Release
developer/soap-1.6/methods/searchtransactionscustom.txt · Last modified: 2012/08/04 10:08 by tem

Page Tools