Skip to main content

Creating a New Customer

HashMap<String, String> customerData = new HashMap<>();
customerData.put("email", "newcustomer@example.com");
customerData.put("company", "New Company LLC");

int customerId = co.create(ChargeOver.Target.CUSTOMER, customerData);
if (customerId < 0) {
System.out.println(co.getLastError());
} else {
System.out.println("Created Customer ID: " + customerId);
}