SearchTransactions

Search transactions and return full transaction records.

Description

This method is used to find transactions even if you have misplaced or can't remember the transaction's RefNum (a unique number assigned to each transaction by the gateway).

The following fields may be used to search the database and return transaction details:

TransID
BatchID
Type
Status
Response
AuthCode
AvsResult
CvcResult
Reason
ErrorCode
Created
CreateTime
Invoice
OrderID
PoNum
CustID
RecCustID
Description
Amount
Currency
RawAmount
Tax
Tip
Shipping
Discount
Subtotal
Cardholder
CCNum
CCNum4First
AvsStreet
AvsZip
User
Clerk
TranTerm
Rest_Table
Sources.Name
ServerIP
ClientIP
CheckNum
VCAccount
VCRouting
VCChecks.Effective
VCChecks.Settled
VCChecks.Processed
VCChecks.Returned
VCChecks.Banknote
Billing_FName
Billing_LName
Billing_Company
Billing_Street
Billing_Street2
Billing_City
Billing_State
Billing_Zip
Billing_Country
Billing_Phone
Email
Fax
Website
Shipping_FName
Shipping_LName
Shipping_Company
Shipping_Street
Shipping_Street2
Shipping_City
Shipping_State
Shipping_Zip
Shipping_Country
Shipping_Phone

Syntax

TransactionSearchResult SearchTransactions( SecurityToken securityToken, SearchFilter [] filters, bool matchAll, bool countOnly, string start, string limit, string sort)

Arguments

TypeNameDescription
SecurityTokensecurityTokenMerchant security token: used to identify merchant and validate transaction. (required)
SearchFilter []filtersArray of search parameters. (required)
boolmatchAllIf 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. (required)
boolcountOnlyif set to "true", only transaction counts will be returned. (required)
stringstartRecord number to start returning from (ie if 1,000 were found and you only want to receive the last 200 you would set Start=800 and Limit=200). (required)
stringlimitMaximum number of transactions to return in result set. (required)
stringsortComma separated list of fields to sort by. (optional)

Return Value

TransactionSearchResultReturns the full transaction records for all transactions matching the specified search parameters.
function searchTransactions()
{
$client = new SoapClient('End point URL');
$securityToken = array(
'SecurityId' => '******-454757-4567457-********',
'UserId' => 'merchant1',
'Password' => 'merchant1'
);
$SearchFilter = array(
'FieldName' => 'CustomerId',
'ComparisonOperator' => 'eq',
'FieldValue' => 1
);
$SearchTransactions = $client->SearchTransactions(
array(
'securityToken' => $securityToken,
'matchAll' => 1,
'countOnly' => 0,
'start' => 0,
'limit' => 1000,
'sort' => 'DateTime',
'filters' => $SearchFilter
))
;
$searchTransactionsResult = $SearchTransactions->SearchTransactionsResult;
}
Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header/>
   <soapenv:Body>
      <ebiz:SearchTransactions>
         <ebiz:securityToken>
            <ebiz:SecurityId>********-2902-4a3e-86f1-********</ebiz:SecurityId>
            <ebiz:UserId>sonoras imperio</ebiz:UserId>
            <ebiz:Password>quae divum incedo</ebiz:Password>
         </ebiz:securityToken>
         <ebiz:filters>
            <ebiz:SearchFilter>
               <ebiz:FieldName>created</ebiz:FieldName>
               <ebiz:ComparisonOperator>gt</ebiz:ComparisonOperator>
               <ebiz:FieldValue>2016-12-01 00:00:00</ebiz:FieldValue>
            </ebiz:SearchFilter>
            <ebiz:SearchFilter>
               <ebiz:FieldName>created</ebiz:FieldName>
               <ebiz:ComparisonOperator>lt</ebiz:ComparisonOperator>
               <ebiz:FieldValue>2018-12-01 23:59:59</ebiz:FieldValue>
            </ebiz:SearchFilter>
         </ebiz:filters>
         <ebiz:matchAll>true</ebiz:matchAll>
         <ebiz:countOnly>false</ebiz:countOnly>
         <ebiz:start>0</ebiz:start>
         <ebiz:limit>100</ebiz:limit>
         <ebiz:sort/>
      </ebiz:SearchTransactions>
   </soapenv:Body>
</soapenv:Envelope>


Response:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <SearchTransactionsResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <SearchTransactionsResult>
            <ErrorsCount>54</ErrorsCount>
            <TransactionsMatched>1557</TransactionsMatched>
            <Transactions>
               <TransactionObject>
                  <DateTime>2017-04-21 12:40:38</DateTime>
                  <Source>MP200test1</Source>
                  <ShippingAddress/>
                  <ServerIP>10.11.233.161</ServerIP>
                  <Response>
                     <RemainingBalance>0</RemainingBalance>
                     <isDuplicate>false</isDuplicate>
                     <ConvertedAmount>0</ConvertedAmount>
                     <ConversionRate>0</ConversionRate>
                     <AuthAmount>0</AuthAmount>
                  </Response>
                  <Details>
                     <NonTax>false</NonTax>
                     <Tax>0</Tax>
                     <Subtotal>0</Subtotal>
                     <Shipping>0</Shipping>
                     <Duty>0</Duty>
                     <Discount>0</Discount>
                     <Amount>0</Amount>
                     <AllowPartialAuth>false</AllowPartialAuth>
                     <Tip>0</Tip>
                  </Details>
                  <User>auto</User>
                  <CustomerID/>
                  <CreditCardData>
                     <InternalCardAuth>false</InternalCardAuth>
                     <CardPresent>false</CardPresent>
                  </CreditCardData>
                  <ClientIP/>
                  <CheckTrace/>
                  <CheckData/>
                  <BillingAddress/>
                  <AccountHolder>DAIGLE/SAMUEL</AccountHolder>
                  <Status>Settled</Status>
                  <TransactionType>Sale</TransactionType>
               </TransactionObject>
               <TransactionObject>
                  <DateTime>2017-04-21 12:59:15</DateTime>
                  <Source>MP200test1</Source>
                  <ShippingAddress/>
                  <ServerIP>10.11.233.161</ServerIP>
                  <Response>
                     <RemainingBalance>0</RemainingBalance>
                     <isDuplicate>false</isDuplicate>
                     <ConvertedAmount>0</ConvertedAmount>
                     <ConversionRate>0</ConversionRate>
                     <AuthAmount>0</AuthAmount>
                  </Response>
                  <Details>
                     <NonTax>false</NonTax>
                     <Tax>0</Tax>
                     <Subtotal>0</Subtotal>
                     <Shipping>0</Shipping>
                     <Duty>0</Duty>
                     <Discount>0</Discount>
                     <Amount>0</Amount>
                     <AllowPartialAuth>false</AllowPartialAuth>
                     <Tip>0</Tip>
                  </Details>
                  <User>auto</User>
                  <CustomerID/>
                  <CreditCardData>
                     <InternalCardAuth>false</InternalCardAuth>
                     <CardPresent>false</CardPresent>
                  </CreditCardData>
                  <ClientIP/>
                  <CheckTrace/>
                  <CheckData/>
                  <BillingAddress/>
                  <AccountHolder>DAIGLE/SAMUEL</AccountHolder>
                  <Status>Settled</Status>
                  <TransactionType>Sale</TransactionType>
               </TransactionObject>
            </Transactions>
            <StartIndex>0</StartIndex>
            <SalesCount>999</SalesCount>
            <SalesAmount>1876775.88</SalesAmount>
            <Limit>2</Limit>
            <VoidsCount>20</VoidsCount>
            <ErrorsAmount>760654.25</ErrorsAmount>
            <DeclinesCount>187</DeclinesCount>
            <DeclinesAmount>23735.72</DeclinesAmount>
            <CreditsCount>207</CreditsCount>
            <CreditsAmount>238821.813</CreditsAmount>
            <AuthOnlyCount>0</AuthOnlyCount>
            <AuthOnlyAmount>0</AuthOnlyAmount>
            <TransactionsReturned>2</TransactionsReturned>
            <VoidsAmount>4459.91</VoidsAmount>
         </SearchTransactionsResult>
      </SearchTransactionsResponse>
   </s:Body>
</s:Envelope>