getMerchantSummary

Reseller only method.

Description

This method allows you to view a summary of a specific merchant's activity during a specified time period. The start and end dates that you set for the search are inclusive.

Use the MerchantID (unique merchant identification assigned by the gateway) to fine the merchant whose activity you would like to view.

Activity included in the search results include details about the number of sales, credits, voids, declines, errors, checks and check refunds.

See also addMerchantApplication, getMerchantApplicationStatus, getMerchant, updateMerchant, deleteMerchant, searchMerchants

Syntax

MerchantSummary getMerchantSummary ( ueSecurityToken Token, integer MerchantID, string Start, string End )

Arguments

Type Name Description
ueSecurityToken Token Reseller security token: used to identify reseller and validate request.
integer MerchantID Merchant ID number assigned by the gateway to an active merchant.
string Start Date for start of summary.
string End Date for end of summary.

Return Value

MerchantSummary Returns summary of merchant activity for specified time period.

Examples

PHP

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

    <?php

    try {

      $MerchantID=2;
      $StartDate='2007-01-01';
      $EndDate='2007-01-31';

      $res=$client->getMerchantSummary($restoken, $MerchantID, $StartDate, $EndDate);

      $this->assertEquals($res->MerchantID, $MerchantID);

      $this->assertTrue($res->SalesCount>1);

    }

    catch (SoapFault $e) {
      echo $client->__getLastRequest();
      echo $client->__getLastResponse();
      die("getMerchant failed: " .$e->getMessage());
    }

    ?>

VB.NET

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

    Dim MerchRefNum = 123456
    Dim StartDate = "2011-05-01"
    Dim EndDate = "2011-05-31"

    Dim Summary As resellerapi.MerchantSummary

    Try
        Summary = client.getMerchantSummary(token, MerchRefNum, StartDate, EndDate)
        MsgBox("Sales Count: " & Summary.SalesCount)

    Catch ex As Exception
        MsgBox("Exception: " & ex.Message)

    End Try

Java

    BigInteger merchrefnum = new BigInteger("118227");
    MerchantSummary summary;
    summary = client.getMerchantSummary(restoken, merchrefnum, "2010-01-01", "2010-10-01");

XML

Request

    `<?xml version="1.0" encoding="UTF-8"?>`
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:ns1="urn:ueresapi"
      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:getMerchantSummary>`
      `<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">`5cc04de62c82f2dad5ee51394b3a5bb012d231a3`</HashValue>`
          `<Seed xsi:type="xsd:string">`12819820871527226844`</Seed>`
          `<Type xsi:type="xsd:string">`sha1`</Type>`
        `</PinHash>`
        `<SourceKey xsi:type="xsd:string">`R:OYZG7PKcLqZ6XYaOOGy255w0K6YWc7`</SourceKey>`
      `</Token>`
      `<MerchRefNum xsi:type="xsd:integer">`117806`</MerchRefNum>`
      `<Start xsi:type="xsd:string">`2010-08-06`</Start>`
      `<End xsi:type="xsd:string">`2010-08-17`</End>`
    `</ns1:getMerchantSummary>`
    `</SOAP-ENV:Body>`
    `</SOAP-ENV:Envelope>`

Response

    `<?xml version="1.0" encoding="UTF-8"?>`
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:ns1="urn:ueresapi"
      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:getMerchantSummaryResponse>`
      `<getMerchantSummaryReturn xsi:type="ns1:MerchantSummary">`
        `<CheckRefundsAmount xsi:type="xsd:double">`235.9`</CheckRefundsAmount>`
        `<CheckRefundsCount xsi:type="xsd:integer">`80`</CheckRefundsCount>`
        `<CheckSalesAmount xsi:type="xsd:double">`91077.89`</CheckSalesAmount>`
        `<CheckSalesCount xsi:type="xsd:integer">`896`</CheckSalesCount>`
        `<ReturnedCheckRefundAmount xsi:type="xsd:double">`23`</ReturnedCheckRefundAmount>`
        `<ReturnedCheckRefundCount xsi:type="xsd:integer">`4`</ReturnedCheckRefundCount>`
        `<ReturnedCheckSaleAmount xsi:type="xsd:double">`46.01`</ReturnedCheckSaleAmount>`
        `<ReturnedCheckSaleCount xsi:type="xsd:integer">`3`</ReturnedCheckSaleCount>`
        `<CheckChargebacksAmount xsi:type="xsd:double">`117.78`</CheckChargebacksAmount>`
        `<CheckChargebacksCount xsi:type="xsd:integer">`17`</CheckChargebacksCount>`
        `<SettledCheckRefundAmount xsi:type="xsd:double">`7880.99`</SettledCheckRefundAmount>`
        `<SettledCheckRefundCount xsi:type="xsd:integer">`19`</SettledCheckRefundCount>`
        `<SettledCheckSaleAmount xsi:type="xsd:double">`5101.02`</SettledCheckSaleAmount>`
        `<SettledCheckSaleCount xsi:type="xsd:integer">`21`</SettledCheckSaleCount>`
        `<CheckDepositCount xsi:type="xsd:integer">`135`</CheckDepositCount>`
        `<LargeCheckRefundsAmount xsi:type="xsd:double">`3.12`</LargeCheckRefundsAmount>`
        `<LargeCheckRefundsCount xsi:type="xsd:integer">`4`</LargeCheckRefundsCount>`
        `<LargeCheckSalesAmount xsi:type="xsd:double">`14.88`</LargeCheckSalesAmount>`
        `<LargeCheckSalesCount xsi:type="xsd:integer">`3`</LargeCheckSalesCount>`
        `<CreditsAmount xsi:type="xsd:double">`0`</CreditsAmount>`
        `<CreditsCount xsi:type="xsd:integer">`0`</CreditsCount>`
        `<DeclinesAmount xsi:type="xsd:double">`0`</DeclinesAmount>`
        `<DeclinesCount xsi:type="xsd:integer">`0`</DeclinesCount>`
        `<MerchRefNum xsi:type="xsd:integer">`117806`</MerchRefNum>`
        `<MerchantName xsi:type="xsd:string">`Example Merchant`</MerchantName>`
        `<SalesAmount xsi:type="xsd:double">`0`</SalesAmount>`
        `<SalesCount xsi:type="xsd:integer">`0`</SalesCount>`
        `<VoidsAmount xsi:type="xsd:double">`0`</VoidsAmount>`
        `<VoidsCount xsi:type="xsd:integer">`0`</VoidsCount>`
      `</getMerchantSummaryReturn>`
    `</ns1:getMerchantSummaryResponse>`
    `</SOAP-ENV:Body>`
    `</SOAP-ENV:Envelope>`