Autumn's V2 API is live in beta. We recommend using this version.
import { Autumn } from 'autumn-js';
const autumn = new Autumn();
const { data, error } = await autumn.balances.create({
customer_id: 'cus_123',
feature_id: 'api_tokens',
granted_balance: 100,
reset: { interval: 'month' }
});{
"success": true
}Create a new balance for a specific feature for a customer.
import { Autumn } from 'autumn-js';
const autumn = new Autumn();
const { data, error } = await autumn.balances.create({
customer_id: 'cus_123',
feature_id: 'api_tokens',
granted_balance: 100,
reset: { interval: 'month' }
});{
"success": true
}Documentation Index
Fetch the complete documentation index at: https://docs-v1.useautumn.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The feature ID to create the balance for
The customer ID to assign the balance to
Entity ID for entity-scoped balances
The initial balance amount to grant
Whether the balance is unlimited
Reset configuration for the balance
Show child attributes
Unix timestamp (milliseconds) when the balance expires
Balance created successfully