Customers
Update Customer
Update information for an existing customer
POST
/
customers
/
{customer_id}
Copy
import { Autumn as autumn } from 'autumn-js';
const customer = await autumn.customers.update('user_123', {
name: 'John Yeo',
email: 'john@example.com'
});
Copy
{
"autumn_id": "cus_2w5dzidzFD1cESxOGnn9frVuVcm",
"created_at": 1677649423000,
"env": "production",
"id": "user_123",
"name": "John Yeo",
"email": "john@example.com",
"fingerprint": "",
"stripe_id": "cus_abc123",
"products": [
{
"id": "pro",
"name": "Pro Plan",
"group": "",
"status": "active",
"started_at": 1677649423000,
"canceled_at": null,
"subscription_ids": [
"sub_123"
],
"current_period_start": 1677649423000,
"current_period_end": 1680327823000
}
],
"features": [
{
"feature_id": "messages",
"unlimited": false,
"interval": "month",
"balance": 80,
"usage": 20,
"included_usage": 100,
"next_reset_at": 1680327823000
}
]
}
Authorizations
Your secret key must be used as the Bearer token for this endpoint.
Path Parameters
Your unique identifier for the customer
Body
application/json
Response
200 - application/json
The response is of type object
.
Copy
import { Autumn as autumn } from 'autumn-js';
const customer = await autumn.customers.update('user_123', {
name: 'John Yeo',
email: 'john@example.com'
});
Copy
{
"autumn_id": "cus_2w5dzidzFD1cESxOGnn9frVuVcm",
"created_at": 1677649423000,
"env": "production",
"id": "user_123",
"name": "John Yeo",
"email": "john@example.com",
"fingerprint": "",
"stripe_id": "cus_abc123",
"products": [
{
"id": "pro",
"name": "Pro Plan",
"group": "",
"status": "active",
"started_at": 1677649423000,
"canceled_at": null,
"subscription_ids": [
"sub_123"
],
"current_period_start": 1677649423000,
"current_period_end": 1680327823000
}
],
"features": [
{
"feature_id": "messages",
"unlimited": false,
"interval": "month",
"balance": 80,
"usage": 20,
"included_usage": 100,
"next_reset_at": 1680327823000
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.