AddSubCustomer

Description

This method adds a sub-customer to your stored customer database so that their information can be recalled at a later date.

Syntax

SubCustomerResponse AddSubCustomer(SecurityToken securityToken,SubCustomer subCustomer);

Arguments

Type

Name

Description

SecurityToken

securityToken

Merchant security token: used to identify merchant and validate transaction. (required)

SubCustomer

customer

Includes sub-customer information, such as customer number, merchant-assigned sub-customer ID, billing address, receipt settings, recurring billing settings, and other pertinent information. (required)

Examples

var client = new IeBizServiceClient();
SecurityToken securityToken = new SecurityToken();
SubCustomer subCustomer = new SubCustomer();
securityToken.UserId = "userid";
securityToken.SecurityId = "2dc496d1-90b4-4a38-ad78-28a795af78e7";
securityToken.Password = "userPassword";
subCustomer.FirstName = "Mark";
subCustomer.LastName = "Wilson";
subCustomer.CompanyName = "CBS";
subCustomer.CustomerId = "C-E&000002";
subCustomer.SubCustomerId = "s001";
subCustomer.CellPhone = "714-555-5014";
subCustomer.Fax = "714-555-5010";
subCustomer.Phone = "714-555-5015";
subCustomer.BillingAddress = new eBizChargeConnectSOAP.Address();
subCustomer.BillingAddress.Address1 = "20 Pacifica";
subCustomer.BillingAddress.Address2 = "Suite 1450";
subCustomer.BillingAddress.City = "Irvine";
subCustomer.BillingAddress.ZipCode = "92618";
subCustomer.BillingAddress.State = "CA";
SubCustomerResponse Response = client.AddSubCustomer(securityToken, subCustomer);

Console.WriteLine(Response.SubCustomerInternalId);
Console.WriteLine(Response.Status);
Console.WriteLine(Response.StatusCode);
Console.WriteLine(Response.Error);
Console.WriteLine(Response.ErrorCode);
Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header/>
   <soapenv:Body>
      <ebiz:AddSubCustomer>
         <ebiz:securityToken>
            <ebiz:SecurityId>2dc496d1-90b4-4a38-ad78-28a795af78e9</ebiz:SecurityId>
            <ebiz:UserId></ebiz:UserId>
            <ebiz:Password></ebiz:Password>
         </ebiz:securityToken>
         <ebiz:subcustomer>
            <ebiz:MerchantId/>
            <ebiz:CustomerInternalId/>
            <ebiz:CustomerId>mm-0011-03</ebiz:CustomerId>
            <ebiz:SubCustomerId>mm-0011-03[4]</ebiz:SubCustomerId>
            <ebiz:SubCustomerInternalId/>
            <ebiz:BillingAddress>
               <ebiz:FirstName>Anthony</ebiz:FirstName>
               <ebiz:LastName>Kim</ebiz:LastName>
               <ebiz:CompanyName>CBS</ebiz:CompanyName>
               <ebiz:Address1>20 Pacifica</ebiz:Address1>
               <ebiz:Address2>Suite 1450</ebiz:Address2>
               <ebiz:City>Irvine</ebiz:City>
               <ebiz:State>CA</ebiz:State>
               <ebiz:ZipCode>92618</ebiz:ZipCode>
            </ebiz:BillingAddress>
            <ebiz:ShippingAddress>
               <ebiz:FirstName>Anthony</ebiz:FirstName>
               <ebiz:LastName>Kim</ebiz:LastName>
               <ebiz:CompanyName>CBS</ebiz:CompanyName>
               <ebiz:Address1>20 Pacifica</ebiz:Address1>
               <ebiz:Address2>Suite 1450</ebiz:Address2>
               <ebiz:City>Irvine</ebiz:City>
               <ebiz:State>CA</ebiz:State>
               <ebiz:ZipCode>92618</ebiz:ZipCode>
            </ebiz:ShippingAddress>
            <ebiz:FirstName>Anthony</ebiz:FirstName>
            <ebiz:LastName>Kim</ebiz:LastName>
            <ebiz:CompanyName>CBS</ebiz:CompanyName>
            <ebiz:Phone>18885007798</ebiz:Phone>
            <ebiz:CellPhone></ebiz:CellPhone>
            <ebiz:Fax>18887007797</ebiz:Fax>
            <ebiz:Email>[email protected]</ebiz:Email>
            <ebiz:WebSite>https://centurybizsolutions.net</ebiz:WebSite>
         </ebiz:subcustomer>
      </ebiz:AddSubCustomer>
   </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">
      <AddSubCustomerResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <AddSubCustomerResult>
            <CustomerId>mm-0011-03</CustomerId>
            <SubCustomerInternalId>3afd2435-dafe-4529-94f6-7fd458af6958</SubCustomerInternalId>
            <Status>Success</Status>
            <StatusCode>1</StatusCode>
            <Error/>
            <ErrorCode>0</ErrorCode>
         </AddSubCustomerResult>
      </AddSubCustomerResponse>
   </s:Body>
</s:Envelope>