Merge pull request #974 from useautumn/mintlify/changelog-march-16-1773619762
Document explicit customer creation for check and track
This commit is contained in:
@@ -4,6 +4,31 @@ mode: "center"
|
||||
description: "Some new things we've shipped at Autumn HQ"
|
||||
---
|
||||
|
||||
<<<<<<< mintlify/changelog-march-16-1773619762
|
||||
<Update label="March 17th 2026">
|
||||
## Explicit customer creation required for `check` and `track`
|
||||
|
||||
The `/check` and `/track` endpoints no longer auto-create customers. If you call these endpoints with a `customer_id` that doesn't exist, the API now returns a `customer_not_found` error instead of silently creating the customer.
|
||||
|
||||
This change encourages explicit customer lifecycle management and prevents accidental customer creation from typos or stale IDs.
|
||||
|
||||
- **Create customers first**: Call [`customers.getOrCreate`](/documentation/customers/creating-customers) during signup or login before using `check` or `track`
|
||||
- **Handle the error**: If a customer doesn't exist, the API returns error code `customer_not_found`
|
||||
|
||||
## `autumn-js` SDK 1.0.0
|
||||
|
||||
The `autumn-js` SDK has been promoted from beta to stable at version `1.0.0`.
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="Improvements">
|
||||
- Explicit customer creation required for `check` and `track` endpoints - [#968](https://github.com/useautumn/autumn/pull/968)
|
||||
- `autumn-js` SDK promoted to `1.0.0` stable release - [#968](https://github.com/useautumn/autumn/pull/968)
|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
</Update>
|
||||
|
||||
=======
|
||||
>>>>>>> dev
|
||||
<Update label="March 16th 2026">
|
||||
## Balance and usage carry-over on plan upgrades
|
||||
|
||||
|
||||
@@ -18,6 +18,10 @@ The `allowed` field will return `true` for a given feature if:
|
||||
|
||||
Under these conditions, you should allow your customer to use the feature. You can then [record the usage event](/documentation/customers/tracking-usage/) so Autumn can update the `allowed` field as necessary.
|
||||
|
||||
<Note>
|
||||
The customer must already exist before calling `check`. If the `customer_id` doesn't match an existing customer, the API returns a `customer_not_found` error. Create customers using [`customers.getOrCreate`](/documentation/customers/creating-customers) during signup or login.
|
||||
</Note>
|
||||
|
||||
## Checking metered features
|
||||
|
||||
Before your customer uses a feature, you can check if the customer is allowed to use it and their current usage.
|
||||
|
||||
@@ -60,6 +60,10 @@ Only the `customerId` field is required — this should be your unique identifie
|
||||
A common pattern is to call `customers.getOrCreate` on every login or signup in your application, so Autumn always has the latest customer information.
|
||||
</Tip>
|
||||
|
||||
<Warning>
|
||||
Customers must be created before calling the [`check`](/documentation/customers/check) or [`track`](/documentation/customers/tracking-usage) endpoints. If you call these endpoints with a `customer_id` that doesn't exist, the API will return a `customer_not_found` error. Make sure to call `customers.getOrCreate` during signup or login before checking access or tracking usage.
|
||||
</Warning>
|
||||
|
||||
## Pre-creating customers via the dashboard
|
||||
|
||||
You can create a customer in the Autumn dashboard before they've ever interacted with your application. This is useful for enterprise or sales-led deals where you want to provision access before the customer signs up.
|
||||
|
||||
@@ -7,6 +7,10 @@ When customers use features in your product, you'll need to record their usage s
|
||||
|
||||
There are two ways to record usage: sending events or setting usage directly.
|
||||
|
||||
<Note>
|
||||
The customer must already exist before calling `track`. If the `customer_id` doesn't match an existing customer, the API returns a `customer_not_found` error. Create customers using [`customers.getOrCreate`](/documentation/customers/creating-customers) during signup or login.
|
||||
</Note>
|
||||
|
||||
## Sending Events
|
||||
|
||||
The track route is recommended for tracking consumable features, like AI messages, credits or API calls. Each time a customer uses a feature, send an event to count their usage.
|
||||
|
||||
Reference in New Issue
Block a user