GetCustomer

Description

The GetCustomer method retrieves a specific Customer object from the EBizCharge platform using either the customerId or customerInternalId.

If both values are provided, the system prioritizes and uses the customerInternalId to locate the customer.

Syntax

Customer GetCustomer(SecurityToken securityToken, string customerId, string customerInternalId)

Arguments

Type

Name

Req.

Description

SecurityToken

securityToken

R

A unique token that is used to identify a merchant and authenticate the API request.

string

customerId

D

Custom ID of the requested Customer object.

Note: Required if customerInternalId is not sent.

string

customerInternalId

D

Internal ID of the requested Customer object.

Note: Required if customerId is not sent.

Return Value

TypeDescription
CustomerReturns the requested Customer object if it exists in the system. Otherwise, a fault is returned.

Example Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header/>
   <soapenv:Body>
      <ebiz:GetCustomer>
         <ebiz:securityToken>
            <ebiz:SecurityId>********-90b4-4a38-ad78-********</ebiz:SecurityId>
            <ebiz:UserId/>
            <ebiz:Password/>
         </ebiz:securityToken>
         <ebiz:customerInternalId>
</ebiz:customerInternalId>
         <ebiz:customerId>mm-0011-01</ebiz:customerId>
      </ebiz:GetCustomer>
   </soapenv:Body>
</soapenv:Envelope>
public void GetCustomer()
{
  eBizService apiClient = new eBizService();
  SecurityToken securityToken = new SecurityToken
  {
    SecurityId = "*******-c870-41b8-aa5c-********",
    UserId = "",
    Password = ""
    };
  var response = apiClient.GetCustomer(securityToken, "", "********-c6a7-41b3-a2e7-********");
  Console.WriteLine(response.CustomerInternalId);
  Console.WriteLine(response.CustomerId);
  Console.ReadLine();
}
function getCustomer()
{
  $client = new SoapClient('End point URL');
  $securityToken = array(
    'SecurityId' => '******-454757-4567457-********',
    'UserId' => 'merchant1',
    'Password' => 'merchant1'
  );
  $getCustomer = array(
    'securityToken' => $securityToken,
    'customerId' => '1'
  );
  $getCustomer = $client->GetCustomer($getCustomer);
  $getCustomerResult = $getCustomer->GetCustomerResult;
}

Example 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">
      <GetCustomerResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <GetCustomerResult>
            <CustomerInternalId>********-20a4-42d7-af21-********</CustomerInternalId>
            <CustomerId>mm-0011-01</CustomerId>
            <FirstName>Jack</FirstName>
            <LastName>Smith</LastName>
            <CompanyName>CBS</CompanyName>
            <Phone>18887777797</Phone>
            <CellPhone>7143581268</CellPhone>
            <Fax>8885557798</Fax>
            <Email>[email protected]</Email>
            <WebSite>centurybizsolutions.net</WebSite>
            <BillingAddress>
               <FirstName>Jack</FirstName>
               <LastName>Smith</LastName>
               <CompanyName>CBS</CompanyName>
               <Address1>50 Golden</Address1>
               <Address2/>
               <City>Abyss</City>
               <State>CA</State>
               <ZipCode>56789</ZipCode>
            </BillingAddress>
         </GetCustomerResult>
      </GetCustomerResponse>
   </s:Body>
</s:Envelope>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <s:Fault>
         <faultcode>s:NotFound</faultcode>
         <faultstring xml:lang="en-US">Not Found</faultstring>
      </s:Fault>
   </s:Body>
</s:Envelope>