Customers

Create a customer

The createCustomer() method takes a CreateCustomerRequest object as its only parameter. This parameter is optional.

$request = $stripe->customers->createCustomerRequest()->setAccountBalance(-500);
$stripe->customers->createCustomer($request);

Retrieve a customer

$customer = $stripe->customers->getCustomer("customer_id");

Update a customer

The UpdateCustomer() method takes an UpdateCustomerRequest object as its second parameter.

$request = $stripe->customers->updateCustomerRequest()->setEmail("foo@bar.com");
$stripe->customers->updateCustomer("customer_id", $request);

Delete a customer

$stripe->customers->deleteCustomer("customer_id");

List customers

$customers = $stripe->customers->listCustomers();