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 } ] }
Delete a customer
Your secret key must be used as the Bearer token for this endpoint.
Your unique identifier for the customer
Also delete the linked Stripe customer
The response is of type object.
object