Create a new customer
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
When you create a customer with the API, BillPro creates a unique identifier. This is the customer id. BillPro also creates an alphanumeric 10-character customer_id attribute and sets the value.
In the BillPro UI, when you create a customer, you can set your own customer_id. When you edit the customer, you can change this value. If you delete your customer_id value, the BillPro UI will replace it with a generated one. In the UI, you do not have to make the customer_id unique, but we recommend it.
When you create an order for a customer, you add the customer id to the order object. The attribute to set is customer_id, but the value of this attribute must be the id of the customer.
BillPro assumes that your integration sends valid customer data from your CRM. The BillPro API performs minimal validation and returns error messages about the essential customer data, as follows.
| Error key | Message |
|---|---|
email | is invalid |
email | can't be blank |
first_name | can't be blank |
last_name | can't be blank |
If the date_of_birth is invalid, BillPro sets it to null without triggering an error. The BillPro API does not validate the country code or post_code of the billing address or shipping address.
The URLs in the examples in API documentation contain the {env} variable. Replace this variable with test for the test environment and app for the production environment.