Skip to main content
Deletes a customer by ID. This operation removes the customer from Autumn and optionally from Stripe.
This action is irreversible. Once a customer is deleted, all associated data including subscriptions, balances, and usage history will be permanently removed.
This endpoint can also be called using DELETE /v1/customers/{customer_id} for REST-style deletion.

Request Body

customer_id
string
required
ID of the customer to delete.
delete_in_stripe
boolean
default:"false"
Whether to also delete the customer in Stripe. If true, the customer will be permanently removed from both Autumn and Stripe. If false, the customer is only removed from Autumn but their Stripe customer record remains.

Response

Returns a confirmation object:
success
boolean
Indicates whether the deletion was successful. Returns true if the customer was deleted.

Example Requests

const result = await autumn.customers.delete({
  customer_id: "cus_123",
  delete_in_stripe: false
});

console.log(result.success); // true

Example Response

{
  "success": true
}

What Gets Deleted

When you delete a customer, the following data is permanently removed from Autumn:
  • Customer record (ID, name, email, metadata, etc.)
  • All active and scheduled subscriptions
  • All purchases
  • All feature balances and usage history
  • All customer entitlements
  • Cached customer data

Stripe Deletion Behavior

delete_in_stripe: false (default)

  • Customer is removed from Autumn only
  • Stripe customer record remains intact
  • Active Stripe subscriptions are not affected
  • Useful if you want to maintain payment history in Stripe

delete_in_stripe: true

  • Customer is removed from both Autumn and Stripe
  • All Stripe subscriptions are canceled
  • Stripe customer record is permanently deleted
  • Cannot be undone - use with caution

Error Responses

If the customer does not exist, you’ll receive a 404 error:
{
  "message": "Customer not found",
  "code": "not_found"
}

Best Practices

  • Test in sandbox first: Always test deletion behavior in your sandbox environment before deleting customers in production.
  • Export data first: If you need to retain customer data for compliance or record-keeping, export it before deletion.
  • Consider deactivation: Instead of deleting, consider canceling subscriptions and keeping the customer record for historical purposes.
  • Stripe integration: If you use Stripe for payment processing outside of Autumn, carefully consider whether to set delete_in_stripe: true.

Build docs developers (and LLMs) love