Autumn's V2 API is live in beta. We recommend using this version.
import { Autumn } from 'autumn-js';
const autumn = new Autumn();
const { data, error } = await autumn.customers.get('customer_id');{
"id": "customer_123",
"created_at": 1762971906762,
"name": "John Doe",
"email": "john@doe.com",
"fingerprint": null,
"stripe_id": "cus_J8A5c31A8tlpwN",
"env": "sandbox",
"metadata": {},
"products": [
{
"id": "pro_plan",
"name": "Pro Plan",
"group": "product_set_1",
"status": "active",
"canceled_at": null,
"started_at": 1762971923843,
"is_default": false,
"is_add_on": false,
"version": 1,
"current_period_start": 1762971905000,
"current_period_end": 1765563905000,
"items": [
{
"type": "feature",
"feature_id": "dashboard",
"feature_type": "static",
"included_usage": 0,
"interval": null,
"entity_feature_id": null,
"display": {
"primary_text": "Dashboard"
}
},
{
"type": "feature",
"feature_id": "messages",
"feature_type": "single_use",
"included_usage": 30,
"interval": "month",
"reset_usage_when_enabled": true,
"entity_feature_id": null,
"display": {
"primary_text": "10 Messages"
}
}
],
"quantity": 1
}
],
"features": {
"messages": {
"id": "messages",
"type": "single_use",
"name": "Messages",
"interval": "month",
"interval_count": 1,
"unlimited": false,
"balance": 10,
"usage": 0,
"included_usage": 10,
"next_reset_at": 1765563905000,
"overage_allowed": false
},
"dashboard": {
"id": "dashboard",
"type": "static",
"name": "Dashboard",
"interval": null,
"interval_count": null,
"unlimited": false,
"balance": 0,
"usage": 0,
"included_usage": 0,
"next_reset_at": null,
"overage_allowed": false
}
}
}import { Autumn } from 'autumn-js';
const autumn = new Autumn();
const { data, error } = await autumn.customers.get('customer_id');{
"id": "customer_123",
"created_at": 1762971906762,
"name": "John Doe",
"email": "john@doe.com",
"fingerprint": null,
"stripe_id": "cus_J8A5c31A8tlpwN",
"env": "sandbox",
"metadata": {},
"products": [
{
"id": "pro_plan",
"name": "Pro Plan",
"group": "product_set_1",
"status": "active",
"canceled_at": null,
"started_at": 1762971923843,
"is_default": false,
"is_add_on": false,
"version": 1,
"current_period_start": 1762971905000,
"current_period_end": 1765563905000,
"items": [
{
"type": "feature",
"feature_id": "dashboard",
"feature_type": "static",
"included_usage": 0,
"interval": null,
"entity_feature_id": null,
"display": {
"primary_text": "Dashboard"
}
},
{
"type": "feature",
"feature_id": "messages",
"feature_type": "single_use",
"included_usage": 30,
"interval": "month",
"reset_usage_when_enabled": true,
"entity_feature_id": null,
"display": {
"primary_text": "10 Messages"
}
}
],
"quantity": 1
}
],
"features": {
"messages": {
"id": "messages",
"type": "single_use",
"name": "Messages",
"interval": "month",
"interval_count": 1,
"unlimited": false,
"balance": 10,
"usage": 0,
"included_usage": 10,
"next_reset_at": 1765563905000,
"overage_allowed": false
},
"dashboard": {
"id": "dashboard",
"type": "static",
"name": "Dashboard",
"interval": null,
"interval_count": null,
"unlimited": false,
"balance": 0,
"usage": 0,
"included_usage": 0,
"next_reset_at": null,
"overage_allowed": false
}
}
}Documentation Index
Fetch the complete documentation index at: https://docs-v1.useautumn.com/llms.txt
Use this file to discover all available pages before exploring further.
expand parameter to fetch data like invoices, entities, rewards, and more.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the customer.
invoices, trials_used, rewards, entities, referrals, payment_method Your unique identifier for the customer.
Timestamp of customer creation in milliseconds since epoch.
The name of the customer.
The email address of the customer.
A unique identifier (eg. serial number) to de-duplicate customers across devices or browsers. For example: apple device ID.
Stripe customer ID.
The environment this customer was created in.
sandbox, live The metadata for the customer.
Show child attributes
The products the customer has access to.
Show child attributes
The features a customer has access to as a dictionary of feature IDs to customer feature objects.
Show child attributes
The invoices for the customer. Returned only if invoices is provided in the expand parameter.
Show child attributes
The entities for the customer. Returned only if entities is provided in the expand parameter.
Show child attributes
The trials used for the customer. Returned only if trials_used is provided in the expand parameter.
Show child attributes
The rewards for the customer. Returned only if rewards is provided in the expand parameter.
Show child attributes
The referrals for the customer. Returned only if referrals is provided in the expand parameter.
Show child attributes
The payment method for the customer on Stripe. Returned only if payment_method is provided in the expand parameter.