developer:soap-1.4:methods:gettransactionreport

Soap API v1.4

getTransactionReport

Pull a transaction report.

Description

This method retrieves a report from the merchant console. Any reports, including custom reports, may be retrieved. The returned data is base 64 encoded. The format of the returned data can be HTML, comma separated (cvs), or tab separated (tab).

Names of built-in reports are prefaced with either “CreditCard:” or “Check:” For example, to pull “Sales by Date” for credit cards, the “Report” parameter would be set to “CreditCard:Sales by Date.”

To pull a custom credit card or check report, prefix the name with “Custom:” or “CustomCheck:” For example, to pull a custom report titled “Recurring Declines” set the “Report” parameter to “Custom:Recurring Declines.”

See also getTransactionStatus, getTransactionCustom, searchTransactions, searchTransactionsCustom, getTransaction

Syntax

string getTransactionReport ( ueSecurityToken Token, string StartDate, string EndDate, string Report, string Format )

Arguments

Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and validate transaction.
string StartDate The earliest report date to retrieve.
string EndDate The latest report date to retrieve.
string Report Name of report to retrieve.
string Format Format of returned report data. Possible values are: html, csv, or tab.

Return Value

string Returns specified report data according to parameters set in search.

Available Reports

Credit Card Reports
creditcard:errors by date Credit card transactions resulting in errors, sorted by date
creditcard:errors by source Credit card transactions resulting in errors, sorted by source key
creditcard:errors by reason Credit card transactions resulting in errors, sorted by reason
creditcard:errors by user Credit card transactions resulting in errors, sorted by user
creditcard:declines by date Credit card transactions resulting in declines, sorted by date
creditcard:declines by source Credit card transactions resulting in declines, sorted by source key
creditcard:declines by reason Credit card transactions resulting in declines, sorted by reason
creditcard:declines by user Credit card transactions resulting in declines, sorted by user
creditcard:sales by date Credit card transactions resulting in approval, sorted by date
creditcard:sales by source Credit card transactions resulting in approval, sorted by source key
creditcard:sales by reason Credit card transactions resulting in approval, sorted by reason
creditcard:sales by user Credit card transactions resulting in approval, sorted by user
Check Reports
check:Deposit Report Check transactions sorted by estimated deposit date
check:All Transactions by DateAll Check transactions sorted by date (does not include errors)
check:settled by dateCheck transactions that have been marked as settled, sorted by date
check:settled by sourceCheck transactions that have been marked as settled, sorted by source
check:settled by usersCheck transactions that have been marked as settled, sorted by user
check:returns by dateCheck transactions that have been marked as returned, sorted by date
check:returns by sourceCheck transactions that have been marked as returned, sorted by source
check:returns by reasonCheck transactions that have been marked as returned, sorted by reason
check:returns by userCheck transactions that have been marked as returned, sorted by user
check:declines by dateCheck transactions were rejected by check processor, sorted by date
check:declines by sourceCheck transactions were rejected by check processor, sorted by sourcekey
check:declines by reasonCheck transactions were rejected by check processor, sorted by reason
check:declines by userCheck transactions were rejected by check processor, sorted by user

Examples

PHP

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

<?php 
 
try { 
 
  $StartDate='2007/01/01'; 
  $EndDate='2007/04/10'; 
  $Format='csv';
  $Report='CreditCard:Errors By Date';
 
  $res=$client->getTransactionReport($token, $StartDate, $EndDate, $Report, $Format);  
  $data=base64_decode($res);
  print_r($data); 
 
} 
 
catch (SoapFault $e) { 
  die("Get Transaction failed :" .$e->getMessage()); 
  } 
 
?> 

Java

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 {
  String StartDate = "2009/01/01";
  String EndDate = "2009/09/09";
  String Format = "html";
  String Report = "CreditCard:Errors By Date";
 
  String response = client.getTransactionReport(token, StartDate, EndDate, Report, Format);
 
  BASE64Decoder decoder = new BASE64Decoder();
  byte[] decodedBytes = decoder.decodeBuffer(response);
 
  String report = new String(decodedBytes);
  System.out.println(report); 
} catch (Exception e) {
    System.out.println("Soap Exception: " + e.getMessage());
}

.NET VB

Dim start As String
        start = "2010-08-01"
        Dim endd As String
        endd = "2010-08-09"
        Dim format As String
        format = "html"
        Dim report As String
        report = "CreditCard:Sales By Date"
 
        Dim response As String
        response = client.getTransactionReport(token, start, endd, report, format)
        Dim decbuff() As Byte
        decbuff = Convert.FromBase64String(response)
        MsgBox(Encoding.UTF8.GetString(decbuff))

.NET C#

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.

string start = "2010-08-01";
            string end = "2010-08-09";
            string format = "html";
            string report = "CreditCard:Sales By Date";
 
            try
            {
                string response = client.getTransactionReport(token, start, end, report, format);
                byte[] decbuff = Convert.FromBase64String(response);
                MessageBox.Show(Encoding.UTF8.GetString(decbuff));
            }
 
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }

XML

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ns1="urn:usaepay" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:getTransactionReport>
 <Token xsi:type="ns1:ueSecurityToken">
  <ClientIP xsi:type="xsd:string">192.168.0.1</ClientIP>
  <PinHash xsi:type="ns1:ueHash">
   <HashValue xsi:type="xsd:string">71aab368c8f0f79253ae280c24d2858506fdcda6</HashValue>
   <Seed xsi:type="xsd:string">13401303171982471987</Seed>
   <Type xsi:type="xsd:string">sha1</Type>
  </PinHash>
  <SourceKey xsi:type="xsd:string">422Rg_Your_Source_Key_LAayCiW67</SourceKey>
 </Token>
 <StartDate xsi:type="xsd:string">06/18/2012</StartDate>
 <EndDate xsi:type="xsd:string">05/19/2012</EndDate>
 <Report xsi:type="xsd:string">creditcard:sales by date</Report>
 <Format xsi:type="xsd:string">html</Format>
</ns1:getTransactionReport>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Change History

Version Change
1.1 Method added prior to soap-1.1
developer/soap-1.4/methods/gettransactionreport.txt · Last modified: 2012/06/19 11:29 by charlie

Page Tools