GetSubCustomer

Description

This method allows you to view all of the stored data for a particular sub-customer and requires the use of customerId and subCustomerId or subCustomerInternalId.

Syntax

SubCustomer GetSubCustomer(SecurityToken securityToken, string customerId, string subCustomerId, string subCustomerInternalId);

Arguments

TypeNameDescription
securitytokensecurityTokenMerchant security token: used to identify merchant and validate transaction. (required)
StringcustomerIdCustomer ID. (required)
StringsubCustomerIdSub-customer ID. (optional)
StringsubCustomerInternalIdUnique sub-customer ID assigned by the internal system. (required)

Return Value

TypeDescription
SubCustomerReturns sub-customer information, such as customer ID, merchant-assigned sub-customer ID, billing address, receipt settings, recurring billing settings, and other pertinent information.

Examples

public function GetSubCustomer()
{
	$client = new SoapClient('End point URL');
    $securityToken = array(
        'SecurityId' => '******-454757-4567457-777',
        'UserId' => 'merchant1',
        'Password' => 'merchant1'
    );
		
	$response = $client->GetSubCustomer(
		array(
			'securityToken' => $securityToken,
			'customerId' => '123',
			'subCustomerId' => '1234',
			'subCustomerInternalId' => '1234-43343-3433-34',
		)
	);
	
	$result = $response->GetSubCustomerResult;
}
Request using subCustomerInternalId

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header/>
   <soapenv:Body>
      <ebiz:GetSubCustomer>
         <ebiz:securityToken>
            <ebiz:SecurityId>********-90b4-4a38-ad78-28a795af78e9</ebiz:SecurityId>
            <ebiz:UserId>userid</ebiz:UserId>
            <ebiz:Password>password</ebiz:Password>
         </ebiz:securityToken>
         <ebiz:customerId></ebiz:customerId>
         <ebiz:subCustomerId></ebiz:subCustomerId>
         <ebiz:subCustomerInternalId>********-dafe-4529-94f6-7fd458af6958</ebiz:subCustomerInternalId>
      </ebiz:GetSubCustomer>
   </soapenv:Body>
</soapenv:Envelope>

OR Request using customerId and subCustomerId

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header/>
   <soapenv:Body>
      <ebiz:GetSubCustomer>
         <ebiz:securityToken>
            <ebiz:SecurityId>********-90b4-4a38-ad78-28a795af78e9</ebiz:SecurityId>
            <ebiz:UserId>userid</ebiz:UserId>
            <ebiz:Password>password</ebiz:Password>
         </ebiz:securityToken>
         <ebiz:customerId>mm-0011-03</ebiz:customerId>
         <ebiz:subCustomerId>mm-0011-03[4]</ebiz:subCustomerId>
         <ebiz:subCustomerInternalId></ebiz:subCustomerInternalId>
      </ebiz:GetSubCustomer>
   </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">
      <GetSubCustomerResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <GetSubCustomerResult>
            <CustomerInternalId/>
            <CustomerId>mm-0011-03</CustomerId>
            <SubCustomerId>mm-0011-03[4]</SubCustomerId>
            <SubCustomerInternalId>*******-dafe-4529-94f6-7fd458af6958</SubCustomerInternalId>
            <BillingAddress>
               <FirstName>Anthony</FirstName>
               <LastName>Kim</LastName>
               <CompanyName>CBS</CompanyName>
               <Address1>55 Golden</Address1>
               <Address2>Suite 7777</Address2>
               <City>Irvine</City>
               <State>CA</State>
               <ZipCode>92618</ZipCode>
            </BillingAddress>
            <FirstName>Anthony</FirstName>
            <LastName>Kim</LastName>
            <CompanyName>CBS</CompanyName>
            <Phone/>
            <CellPhone/>
            <Fax/>
            <Email>[email protected]</Email>
            <WebSite/>
         </GetSubCustomerResult>
      </GetSubCustomerResponse>
   </s:Body>
</s:Envelope>
public void GetSubCustomer()
        {
            eBizService apiClient = new eBizService();
            SecurityToken securityToken = new SecurityToken
            {
                SecurityId = "*******-c870-41b8-aa5c-205e55b7a049",
                UserId = "",
                Password = ""
            };
            var response = apiClient.GetSubCustomer(securityToken, "", "", "1f862cd9-c6a7-41b3-a2e7-226988095b41");
            Console.WriteLine(response.CustomerInternalId);
            Console.WriteLine(response.CustomerId);
            Console.ReadLine();
        }