GetSubCustomer
Description
The GetSubCustomer method retrieves a SubCustomer object from the EBizCharge platform.
Syntax
SubCustomer GetSubCustomer(SecurityToken securityToken, string customerId, string subCustomerId, string subCustomerInternalId)
Arguments
Type | Name | Description | |
|---|---|---|---|
securityToken | R | A unique token that is used to identify a merchant and authenticate the API request. | |
string | customerId | D | Identifies the Customer object associated with the SubCustomer object to retrieve. Note: Required if |
string | subCustomerId | D | Identifies the SubCustomer object to retrieve. Note: Required if |
string | subCustomerInternalId | D | Identifies the SubCustomer object to retrieve. Note: Required if |
Note: It is best practice to provide either subCustomerInternalId, or customerId and subCustomerId — but not all three.
Return Value
| Type | Description |
|---|---|
| SubCustomer | SubCustomer object matching the entered ID(s). 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:GetSubCustomer>
<ebiz:securityToken>
<ebiz:SecurityId>********-90b4-4a38-ad78-************</ebiz:SecurityId>
<ebiz:UserId/>
<ebiz:Password/>
</ebiz:securityToken>
<ebiz:customerId/>
<ebiz:subCustomerId/>
<ebiz:subCustomerInternalId>********-dafe-4529-94f6-************</ebiz:subCustomerInternalId>
</ebiz:GetSubCustomer>
</soapenv:Body>
</soapenv:Envelope>public void GetSubCustomer()
{
eBizService apiClient = new eBizService();
SecurityToken securityToken = new SecurityToken
{
SecurityId = "*******-c870-41b8-aa5c-************",
UserId = "",
Password = ""
};
var response = apiClient.GetSubCustomer(securityToken, "", "", "*************-41b3-a2e7-************");
Console.WriteLine(response.CustomerInternalId);
Console.WriteLine(response.CustomerId);
Console.ReadLine();
}public function GetSubCustomer()
{
$client = new SoapClient('End point URL');
$securityToken = array(
'SecurityId' => '******-454757-4567457-***',
'UserId' => 'merchant1',
'Password' => 'merchant1'
);
$response = $client->GetSubCustomer(
array(
'securityToken' => $securityToken,
'customerId' => '123',
'subCustomerId' => '1234',
'subCustomerInternalId' => '**********-3433-**',
)
);
$result = $response->GetSubCustomerResult;
}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">
<GetSubCustomerResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
<GetSubCustomerResult>
<CustomerInternalId/>
<CustomerId>mm-0011-03</CustomerId>
<SubCustomerId>mm-0011-03[4]</SubCustomerId>
<SubCustomerInternalId>*******-dafe-4529-94f6-************</SubCustomerInternalId>
<BillingAddress>
<FirstName>Anthony</FirstName>
<LastName>Kim</LastName>
<CompanyName>CBS</CompanyName>
<Address1>123 Golden</Address1>
<Address2>123 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><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>Updated 6 months ago
