> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useautumn.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Managing Customers

> Learn how to view and manage customer information in Autumn

The customer details page provides a comprehensive view of a customer's information, subscriptions, and usage. You can access this by clicking on any customer from the [Customers page](https://app.useautumn.com/customers).

The customer details page shows:

* **Products**: View active subscriptions, status, billing dates, and feature limits
* **Features**: Track usage, limits, reset dates and history graphs
* **Invoices**: See billing history, payment status, amounts and hosted invoice pages
* **Events**: View feature usage events that have been tracked for the customer

## Editing Feature Balances

You can directly edit a customer's feature balances via the dashboard, to give them additional allowance or alter how much they'll be charged for their next invoice (typically in case of errors).

1. Navigate to the Customer details page
2. Under "Available Features", click on the feature you want to edit the balance for.
3. In the popup, enter the new balance value:
   * If you're giving them more allowance (`granted`) of a feature, enter a **positive** number
   * If you're changing how much usage they'll be charged for, enter a **negative** number
4. Optionally, set a new usage reset date for the feature
5. Click "Update"

> [!NOTE]
>
> Editing a balance will only last until the next reset date of the feature. If
> you want to permanently set a new allowance, you should create a custom
> product with the new allowance.

> [!TIP]
>
> If you want to give a customer access to a feature that isn't present in the
> product they're on, you can create a custom product with the new feature.

## Adding a Coupon

To apply a discount to a customer:

1. Go to the customer's details page
2. Under the "Rewards" section of the sidebar, click "Add Coupon"
3. Select a reward from the available options
4. Click "Add Reward"

The discount will show up when a Checkout URL is generated for the customer via `attach`, or from their next invoice.

## Updating Customer Properties

You can update a customer's basic information through either the dashboard or API:

#### Via Dashboard

1. Navigate to the customer's details page
2. On the right-hand side, you'll see a "Details" section in the sidebar. Click on any of the fields.
3. Update the desired fields (name, email, etc.)
4. Click "Update"

#### Via API

You can also update a customer's properties via the API, useful for when a customer changes their details in your application.

```typescript TypeScript theme={null}
import { Autumn } from "autumn-js";

const autumn = new Autumn({ secretKey: "am_sk_test_1234" });

await autumn.customers.update({
  customerId: "user_123",
  name: "Mr New Name",
  email: "newemail@example.com",
});
```

```python Python theme={null}
from autumn_sdk import Autumn

autumn = Autumn("am_sk_test_1234")

await autumn.customers.update(
    customer_id="user_123",
    name="Mr New Name",
    email="newemail@example.com",
)
```

```bash cURL theme={null}
curl -X POST "https://api.useautumn.com/v1/customers/update" \
  -H "Authorization: Bearer am_sk_test_1234" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "user_123",
    "name": "Mr New Name",
    "email": "newemail@example.com"
  }'
```

## Billing Details

Billing details are the tax and invoicing fields stored on the customer's linked Stripe customer: billing address, tax IDs (e.g. VAT), tax exemption, and custom fields printed on every invoice (e.g. a PO number). Autumn doesn't store them; it writes them to Stripe and reads them back live.

| Field | Behaviour |
| - | - |
| `address` | Replaces the whole address, as in Stripe. `null` clears it. |
| `tax_ids` | `add` and `remove` lists. Tax IDs you don't list are kept. Stripe tax IDs can't be edited, so to change one, remove the old ID and add the new one. |
| `tax_exempt` | `none`, `exempt`, or `reverse` (reverse charge). |
| `invoice_settings.custom_fields` | Up to 4 `{ name, value }` pairs shown on every invoice. Replaces the existing list; `null` clears it. |

```typescript TypeScript theme={null}
await autumn.customers.update({
  customerId: "user_123",
  billingDetails: {
    address: { line1: "1 Main St", city: "Berlin", postalCode: "10115", country: "DE" },
    taxIds: {
      add: [{ type: "eu_vat", value: "DE123456789" }],
      remove: [{ type: "gb_vat", value: "GB123456789" }],
    },
    taxExempt: "reverse",
    invoiceSettings: { customFields: [{ name: "PO Number", value: "PO-10042" }] },
  },
});
```

```python Python theme={null}
await autumn.customers.update(
    customer_id="user_123",
    billing_details={
        "address": {"line1": "1 Main St", "city": "Berlin", "postal_code": "10115", "country": "DE"},
        "tax_ids": {
            "add": [{"type": "eu_vat", "value": "DE123456789"}],
            "remove": [{"type": "gb_vat", "value": "GB123456789"}],
        },
        "tax_exempt": "reverse",
        "invoice_settings": {"custom_fields": [{"name": "PO Number", "value": "PO-10042"}]},
    },
)
```

```bash cURL theme={null}
curl -X POST "https://api.useautumn.com/v1/customers/update" \
  -H "Authorization: Bearer $AUTUMN_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "user_123",
    "billing_details": {
      "address": { "line1": "1 Main St", "city": "Berlin", "postal_code": "10115", "country": "DE" },
      "tax_ids": {
        "add": [{ "type": "eu_vat", "value": "DE123456789" }],
        "remove": [{ "type": "gb_vat", "value": "GB123456789" }]
      },
      "tax_exempt": "reverse",
      "invoice_settings": { "custom_fields": [{ "name": "PO Number", "value": "PO-10042" }] }
    }
  }'
```

To read them back, add `billing_details` to `expand` when fetching the customer. It returns `null` when no Stripe customer is linked.

```typescript theme={null}
const customer = await autumn.customers.get({
  customerId: "user_123",
  expand: ["billing_details"],
});
```

You can also pass `billing_details` when creating a customer; Autumn creates the Stripe customer if needed. On update, the customer must already be linked to a Stripe customer.

> [!NOTE]
>
> Invalid values (for example a malformed VAT number) are rejected with Stripe's
> error message, and changes from the same request are not left half-applied.

In the dashboard, billing details are under **Edit customer** on the customer's page.

#### Deleting a Customer

To delete a customer:

1. Go to the customer's details page
2. Click the "Settings" icon in the top right
3. Click "Delete"

> [!WARNING]
>
> Deleting a customer will not delete it in Stripe. If they have existing
> subscriptions, you should cancel them from Stripe if needed.

## Accounts

An account groups related customers. Use it when one contract is split across many customers. For example, a parent company and the companies it bought.

Accounts are only a tool for your team. They do not change billing. Each customer keeps its own plans, balances, and invoices.

Customers in an account can each have their own billing customer (for example in Stripe), or share the same one.

To open an account, go to a customer's page and click the account button at the top. There you can:

* See all linked customers, their plans, and their Stripe customers in one place
* Link more customers, by search or from **Suggested**
* Set a name and an ID for the account

How linking works:

* A customer can be in only one account. To add a customer that is in another account, you must move it.
* Linking the first customer creates the account. Removing the last customer deletes it.
* Removing a customer from an account does not change the customer.

#### Suggestions

Autumn suggests customers that may belong to the same business. A customer is suggested if it has:

* The same Stripe customer
* The same email domain (free email like gmail.com does not count)
* The same `fingerprint`
* A similar name

Customers with more matches show first. Autumn never links suggestions by itself. You choose.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.