Learn how to create a customer
This tutorial describes the process to create a customer with the BillPro API. We assume you have already worked through Get started with the BillPro API.
-
In the BillPro UI, create a user for the integration and get the
Api Token. -
Get the minimal data object for the customer from the documentation. This is the minimum customer data that you can send to create a payment. We recommend that you always send as much data as possible to get the highest possible transaction approval ratio.
{ "customer": { "first_name": "Jane", "last_name": "Smith", "email": "[email protected]" } } -
This is an example of a full create customer object. Note that the create customer object is different to the get customer object.
{ "customer": { "first_name": "Jane", "last_name": "Smith", "date_of_birth": "20/05/1972", "email": "[email protected]", "phone": "+447700181908", "organisation": { "name": "TEST2", "registration_number": "01234567", "web_url": "https://test.example.com", "vat": "GB123456789", "description": "Testing company" }, "addresses": { "billing_address": { "street": "28 Milsom St", "city": "Bath", "state": "Avon", "country": "GB", "postal_code": "BA1 1DG" }, "shipping_address": { "street": "28 Milsom St", "city": "Bath", "state": "Avon", "country": "GB", "postal_code": "BA1 1DG" } } } } -
Modify the example data object with your data.
-
You must enter a
first_name. -
You must enter a
last_name. -
You must enter an
email. -
Optional: for the
phone, enter the+sign, the country code and the phone number with no spaces. You can send SMS payment links to this number. -
Optional: To display the customer's VAT or tax number on their order summaries, invoices, receipts, and credit notes, enter an
organisationand setvatto the VAT or tax number. -
Optional: enter a
billing_addressand/orshipping_addressfor the customer. This is recommended for ecommerce payments. -
Here is an example of a minimal request to create a customer.
curl --request POST \ --url https://staging.bill.pro/api/v1/customers \ --header 'Authorization: Bearer {api_token}' \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data ' { "customer": { "first_name": "Jane", "last_name": "Smith", "email": "[email protected]" } } ' -
Replace
{api_token}with your API Token -
Send your request to the endpoint URL for customers at
https://staging.bill.pro/api/v1/customers -
Check the response code, which should be
201for a successful request. Here is an example of the response data from a successful request. If there is an error in the body object, the response code will be422.
{
"id": 742,
"first_name": "Jane",
"last_name": "Smith",
"customer_id": "62A763AC53",
"date_of_birth": null,
"email": "[email protected]",
"phone": null,
"status": "active",
"created_at": "2026-05-04T10:17:23.921Z",
"updated_at": "2026-05-04T10:17:23.921Z",
"addresses": []
}