Skip to main content

Create customer

Last updated: 06-Jul-2018
Rate this article:


Use the createCustomer method to add the details of a customer entity into the 2Checkout system. By default, customer status is Inactive until you assign a specific subscription to the customer. Following that action, customer status reflects the status of the attached subscription(s).


Parameters Type/Description


Required (string)


Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect.  The sessionID expires in 10 minutes.




Parameters Type/Description




System-generated customer reference.



require ('PATH_TO_AUTH');

$newCustomer = new stdClass();
$newCustomer->AvangateCustomerReference = null;
$newCustomer->ExternalCustomerReference = 'ThisIsATestReference123456';
$newCustomer->FirstName = 'NewCustomer';
$newCustomer->LastName = 'NewCustomerLastName';
$newCustomer->Company = null;
$newCustomer->FiscalCode = null;
$newCustomer->Address1 = 'Address';
$newCustomer->Address2 = null;
$newCustomer->City = 'LA';
$newCustomer->Zip = '90210';
$newCustomer->CountryCode = 'us';
$newCustomer->Phone = null;
$newCustomer->Fax = null;
$newCustomer->Email = '';
$newCustomer->ExistingCards = null;
$newCustomer->Enabled = null;
$newCustomer->Trial = null;
$newCustomer->Language = 'en';

$jsonRpcRequest = array (
'method' => 'createCustomer',
'params' => array($sessionID, $newCustomer),
'id' => $i++,
'jsonrpc' => '2.0');

var_dump (callRPC((Object)$jsonRpcRequest, $host, true));
Rate this article:

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo