Skip to main content
PATCH
/
v1
/
subscriptions
/
customers
/
{customer_id}
JavaScript
import Hercules from '@usehercules/sdk';

const client = new Hercules({
  apiVersion: '2025-12-09',
  apiKey: process.env['HERCULES_API_KEY'], // This is the default and can be omitted
});

const customer = await client.beta.subscriptions.customers.update('customer_id');

console.log(customer.id);
{
  "id": "<string>",
  "created": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "email": "<string>",
  "phone": "<string>",
  "address": {
    "line1": "<string>",
    "line2": "<string>",
    "city": "<string>",
    "state": "<string>",
    "postal_code": "<string>",
    "country": "<string>"
  },
  "stripe_id": "<string>"
}

Authorizations

Authorization
string
header
required

API key authentication. Include your API key in the Authorization header as: Bearer

Path Parameters

customer_id
string
required

The unique identifier of the customer

Body

application/json

Request to update a customer. Only provided fields are updated.

name
string

The customer's full name

email
string<email>

The customer's email address for receipts and notifications

phone
string

The customer's phone number

address
object

The customer's billing address

Response

200 - application/json

The updated customer object

A billable customer. Represents the entity in your app that will be charged—typically a user, organization, or project.

id
string
required

Unique identifier for the entitlement

created
string<date-time>
required

Timestamp when the customer was created

name
string | null

The customer's full name

email
string | null

The customer's email address for receipts and notifications

phone
string | null

The customer's phone number

address
object

The customer's billing address

stripe_id
string | null

Internal payment provider reference