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


The customer will be assigned a unique customer number by the gateway (CustNum), which you can then use to establish recurring billing cycles, recall customer data, and manually charge the customer for later products or services without needing to reenter their information.

See also runCustomerTransaction, enableCustomer, disableCustomer, deleteCustomer, searchCustomerID, getCustomer, searchCustomers, getCustomerHistory, addCustomerPaymentMethod, deleteCustomerPaymentMethod, updateCustomer, quickUpdateCustomer


integer addCustomer ( ueSecurityToken Token, CustomerObject CustomerData )


Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and validate transaction.
CustomerObject CustomerData Includes customer information such as customer number, merchant assigned customer ID, billing address, receipt settings, recurring billing settings, and other pertinent information.

Return Value

integer Returns result of add customer request.



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

try { 
		'Company'=>'Acme Corp',
		'Street'=>'1234 main st',
		'Street2'=>'Suite #123',
		'City'=>'Los Angeles',
	'PaymentMethods' => array(
			'CreditCardData' => array(
					'CardType'=>'', 'CardCode'=>'','AvsStreet'=>'',
					'AvsZip'=>'', 'CardPresent'=>'','MagStripe'=>'',
					'TermType'=>'','MagSupport'=>'','XID'=>'', 'CAVV'=>'',
					'ECI'=>'','InternalCardAuth'=>'', 'Pares'=>''
				"MethodName"=>"My Visa",
		'CustomData'=>base64_encode(serialize(array("mydata"=>"We could put anything in here!"))),
			array('Field'=>'Foo', 'Value'=>'Testing'),
			array('Field'=>'Bar', 'Value'=>'Tested')
	'CustomerID'=>123123 + rand(),
	'Description'=>'Weekly Bill',
	'Notes'=>'Testing the soap addCustomer Function',
	'ReceiptNote'=>'addCustomer test Created Charge',
catch(SoapFault $e) { 
  echo "SoapFault: " .$e->getMessage(); print_r($e); 
  echo "\n\nRequest: " . $tran->__getLastRequest(); 
  echo "\n\nResponse: " . $tran->__getLastResponse(); 


Dim customer As usaepay.CustomerObject = New usaepay.CustomerObject
        Dim address As usaepay.Address = New usaepay.Address
        address.FirstName = "John"
        address.LastName = "Doe"
        address.Company = "Acme"
        address.Street = "123 main st."
        address.City = "Hollywood"
        address.State = "ca"
        address.Zip = "91607"
        address.Country = "USA"
        customer.BillingAddress = address
        customer.Enabled = True
        customer.Amount = 5.0
        customer.Next = "2010-08-15"
        customer.Schedule = "monthly"
        Dim payMethod(0) As usaepay.PaymentMethod
        payMethod(0) = New usaepay.PaymentMethod
        payMethod(0).CreditCardData = New usaepay.CreditCardData
        payMethod(0).CreditCardData.CardExpiration = "1212"
        payMethod(0).CreditCardData.CardNumber = "4444555566667779"
        payMethod(0).CreditCardData.AvsStreet = "123 Main st."
        payMethod(0).CreditCardData.AvsZip = "90046"
        payMethod(0).MethodName = "My Visa"
        customer.PaymentMethods = payMethod
        Dim response As String
        response = client.addCustomer(token, customer)


usaepay.CustomerObject customer = new usaepay.CustomerObject();
            usaepay.Address address = new usaepay.Address();
            address.FirstName = "John";
            address.LastName = "Doe";
            address.Company = "Acme";
            address.Street = "123 main st.";
            address.City = "Hollywood";
            address.State = "ca";
            address.Zip = "91607";
            address.Country = "USA";
            customer.BillingAddress = address;
            customer.Enabled = true;
            customer.Amount = 5.00;
            customer.Next = "2010-08-15";
            customer.Schedule = "monthly";
            usaepay.PaymentMethod[] payMethod = new usaepay.PaymentMethod[1];
            payMethod[0] = new usaepay.PaymentMethod();
            payMethod[0].CreditCardData = new usaepay.CreditCardData();
            payMethod[0].CreditCardData.CardExpiration = "1212";
            payMethod[0].CreditCardData.CardNumber = "4444555566667779";
            payMethod[0].CreditCardData.AvsStreet = "123 Main st.";
            payMethod[0].CreditCardData.AvsZip = "90046";
            payMethod[0].MethodName = "My Visa";
            customer.PaymentMethods = payMethod;
            string response;
                response = client.addCustomer(token, customer);
            catch (Exception err)
developer/soap-1.1/methods/addcustomer.txt · Last modified: 2017/01/30 10:29 by charlie

Page Tools