Customers
Retrieve a customer
Fetches one customer by id, including their country, VAT status and the test clock they are attached to.
GET/v1/customers/{customer_id}
Parameters
| Parameter | Description |
|---|---|
| customer_idstring · pathrequired | Id of the customer, which starts cus_. |
Returns
The customer object. A customer belonging to the other mode, or to another account, is a 404 rather than a 403, so no id existence leaks across tenants.
Deleted and purged customers are a 404 here too. Their invoices and payments still resolve; the customer itself stops being readable.
Test it
Compare the response against the same record in the console under Customers. The two views are the same row.
Errors
| Status | Cause |
|---|---|
| 400 | The request was refused (type: invalid_request_error): a required parameter is missing (parameter_missing), one failed validation (parameter_invalid) or is not one the operation takes (parameter_unknown), and param names it. |
| 401 | No credential, or one that does not authenticate. |
| 402 | The account is suspended (tenant_suspended), or the payment provider refused a charge or refund the call made (type: payment_error, code: payment_refused). |
| 403 | Authenticated, but not allowed: missing scope (insufficient_scope), a key of the wrong mode (mode_mismatch), or a refused origin. Needs the customers:read scope. |
| 404 | No such object in this account and mode. |
| 429 | Rate limited. Retry-After says when to try again. |
| 500 | Something failed on BillKit's side (type: api_error). Retry with the same Idempotency-Key. |
| 503 | Temporarily unable to serve. reason says whether the request was attempted. |
Other customers operations
- List customers GET /v1/customers
- Create a customer POST /v1/customers
- Delete customer DELETE /v1/customers/{customer_id}
- Update customer POST /v1/customers/{customer_id}
- Purge customer POST /v1/customers/{customer_id}/purge
- Set customer VAT number POST /v1/customers/{customer_id}/vat_number
BillKit