Customers
Customers represent the people paying you. Create a customer before you save a card, run a charge, or start a subscription.
Use cases: Keep a single record for every payer across charges and subscriptions, attach metadata to link to your own users table, and let customers manage cards from the hosted Billing Portal.
POST
/v1/customersCreate a customer scoped to your project. Customers are isolated per project and per mode (test vs live).
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
name | string | required | Display name. Used across the dashboard and receipts. |
email | string | Email address. Used for receipts, setup-session emails, and the Billing Portal. | |
phone | string | Phone number in E.164 format (e.g. +972501234567). | |
locale | string | Preferred locale for customer-facing surfaces. Defaults to "he". | |
taxId | string | Tax ID (if the customer is a business). | |
metadata | object | Set of key-value pairs you can attach to the object for your own use. Returned as-is on retrieval. |
Request
curl -X POST "https://api.ching.co.il/v1/customers" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example_name",
"email": "example_email",
"phone": "example_phone",
"locale": "example_locale",
"taxId": "example_taxId",
"metadata": {}
}'Response
Response
{
"success": true,
"data": {
"id": "cus_V8ltq1pK_MWH",
"object": "customer",
"name": "Tal Levi",
"email": "tal@example.com",
"phone": "+972501234567",
"locale": "he",
"taxId": null,
"metadata": {},
"default_payment_method": "pm_WMc9X22NT1af",
"livemode": false,
"created": "2026-04-19T09:12:43.000Z"
}
}GET
/v1/customersList the 100 most recent customers in the current mode, newest first.
List endpoints currently return up to 100 results, newest first. For larger result sets use the dashboard export or filter by metadata in your application layer.
Request
curl -X GET "https://api.ching.co.il/v1/customers" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Response
{
"success": true,
"data": [
{
"id": "cus_V8ltq1pK_MWH",
"object": "customer",
"name": "Tal Levi",
"email": "tal@example.com",
"phone": "+972501234567",
"locale": "he",
"taxId": null,
"metadata": {},
"default_payment_method": "pm_WMc9X22NT1af",
"livemode": false,
"created": "2026-04-19T09:12:43.000Z"
}
]
}GET
/v1/customers/:idRetrieve a customer by its id.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
id | string | required | The customer id (e.g. cus_V8ltq1pK_MWH). |
Request
curl -X GET "https://api.ching.co.il/v1/customers/:id" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
Response
{
"success": true,
"data": {
"id": "cus_V8ltq1pK_MWH",
"object": "customer",
"name": "Tal Levi",
"email": "tal@example.com",
"phone": "+972501234567",
"locale": "he",
"taxId": null,
"metadata": {},
"default_payment_method": "pm_WMc9X22NT1af",
"livemode": false,
"created": "2026-04-19T09:12:43.000Z"
}
}