Customers API
The Customers API lets you create, retrieve, update, list, and delete customers. A customer groups a payer's details (name, email, phone) under a stable reference you can reuse across payment intents.
You do not have to use this API to attach a customer to a payment: you can pass a customer object inline when creating a payment intent and we reconcile it for you. Use this API when you want to manage customer records directly.
Create a customer
Creates a customer, or updates the existing one when you reuse a reference. This is a partial upsert: only the fields you send change.
Parameters
referenceoptional, stringYour own identifier for the customer, used as the match key. If a customer with this reference already exists we update it; otherwise (or if omitted) we create a new one.
first_nameoptional, stringCustomer first name.
last_nameoptional, stringCustomer last name.
emailoptional, stringCustomer email.
phone_numberoptional, stringCustomer phone number.
const response = await fetch('https://api-{region}.orchestrapay.com/v202607/customers', {
method: 'POST',
headers: {
'Authorization': 'Bearer orch_sk_live_eu1_...',
'Content-Type': 'application/json'
},
body: JSON.stringify({
reference: 'user_12345',
first_name: 'Jane',
last_name: 'Doe',
email: 'jane@example.com',
phone_number: '+15555550123'
})
});Response Parameters
customerstringThe typed, region-coded customer identifier (cus_...).
referencestringYour identifier for the customer, if you set one.
first_namestringCustomer first name.
last_namestringCustomer last name.
emailstringCustomer email.
phone_numberstringCustomer phone number.
created_atstringISO 8601 creation timestamp.
resource_createdbooleantrue if a new customer was created, false if an existing one was updated via its reference.
{
"customer": "cus_eu1_2c1d7ef04db08d2e5e980f3f3bc70000",
"reference": "user_12345",
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"phone_number": "+15555550123",
"created_at": "2026-07-01T12:00:00Z",
"resource_created": true
}Get a customer
Retrieves a single customer by its reference.
Parameters
customerstringThe customer identifier to retrieve (cus_...).
const response = await fetch('https://api-{region}.orchestrapay.com/v202607/customers/cus_eu1_2c1d7ef04db08d2e5e980f3f3bc70000', {
headers: { 'Authorization': 'Bearer orch_sk_live_eu1_...' }
});Response Parameters
Returns the customer object: customer, reference, first_name, last_name, email, phone_number, created_at.
{
"customer": "cus_eu1_2c1d7ef04db08d2e5e980f3f3bc70000",
"reference": "user_12345",
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"phone_number": "+15555550123",
"created_at": "2026-07-01T12:00:00Z"
}Update a customer
Updates a customer. This is a partial update: only the fields you send change; omitted fields are left untouched.
Parameters
customerstringThe customer identifier to update (cus_...).
referenceoptional, stringYour identifier for the customer.
first_nameoptional, stringCustomer first name.
last_nameoptional, stringCustomer last name.
emailoptional, stringCustomer email.
phone_numberoptional, stringCustomer phone number.
const response = await fetch('https://api-{region}.orchestrapay.com/v202607/customers/cus_eu1_2c1d7ef04db08d2e5e980f3f3bc70000', {
method: 'POST',
headers: {
'Authorization': 'Bearer orch_sk_live_eu1_...',
'Content-Type': 'application/json'
},
body: JSON.stringify({ email: 'jane.doe@example.com' })
});Response Parameters
Returns the updated customer object (same shape as Get a customer).
{
"customer": "cus_eu1_2c1d7ef04db08d2e5e980f3f3bc70000",
"reference": "user_12345",
"first_name": "Jane",
"last_name": "Doe",
"email": "jane.doe@example.com",
"phone_number": "+15555550123",
"created_at": "2026-07-01T12:00:00Z"
}Query customers
Returns a list of customers, most recent first. Cursor-paginated with a fixed set of filters.
Query Parameters
limitoptional, integer, default is 25How many customers to return, 1 to 100.
starting_afteroptional, stringA cursor for pagination: a customer id (cus_...). Returns the page immediately after this object.
ending_beforeoptional, stringA cursor for pagination: a customer id (cus_...). Returns the page immediately before this object.
referenceoptional, stringOnly return the customer with this reference.
emailoptional, stringOnly return customers with this email.
createdoptional, objectFilter by creation time. Pass a Unix timestamp (or ISO 8601), or a range object.
const params = new URLSearchParams({ limit: '25', email: 'jane@example.com' });
const response = await fetch(
'https://api-{region}.orchestrapay.com/v202607/customers?' + params,
{ headers: { 'Authorization': 'Bearer orch_sk_live_eu1_...' } }
);Response Parameters
dataarrayThe list of customers, most recent first.
has_morebooleantrue if there are more results after this page.
{
"data": [
{
"customer": "cus_eu1_2c1d7ef04db08d2e5e980f3f3bc70000",
"reference": "user_12345",
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"phone_number": "+15555550123",
"created_at": "2026-07-01T12:00:00Z"
}
],
"has_more": false
}Delete a customer
Deletes a customer. This detaches the record; it does not affect payment intents or refunds already made for that customer.
Parameters
customerstringThe customer identifier to delete (cus_...).
const response = await fetch('https://api-{region}.orchestrapay.com/v202607/customers/cus_eu1_2c1d7ef04db08d2e5e980f3f3bc70000', {
method: 'DELETE',
headers: { 'Authorization': 'Bearer orch_sk_live_eu1_...' }
});Response Parameters
customerstringThe deleted customer identifier (cus_...).
deletedbooleanAlways true on a successful delete.
{
"customer": "cus_eu1_2c1d7ef04db08d2e5e980f3f3bc70000",
"deleted": true
}