Skip to main content
DELETE
/
customers
/
{customer_id}
TypeScript
import { Autumn as autumn } from 'autumn-js';

const { data } = await autumn.customers.delete('user_123', {
  delete_in_stripe: true
});
{
  "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,
      "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

Authorization
string
header
required

Your secret key must be used as the Bearer token for this endpoint.

Path Parameters

customer_id
string
required

Your unique identifier for the customer

Query Parameters

delete_in_stripe
boolean
default:false

Also delete the linked Stripe customer

Response

200 - application/json
autumn_id
string

Autumn's internal identifier for the customer

created_at
integer

Timestamp of customer creation in milliseconds since epoch

env
enum<string>

Environment the customer is in

Available options:
production,
sandbox
id
string

Your unique identifier for the customer

name
string

Customer's name

email
string

Customer's email address

fingerprint
string

Unique identifier (eg, serial number) to detect duplicate customers and prevent free trial abuse

stripe_id
string

Stripe customer ID

products
object[]

List of products the customer has access to

features
object[]

List of features the customer has access to

invoices
object[]

Invoices for this customer (only included when expand=invoices)

I