import { Autumn } from 'autumn-js'
const autumn = new Autumn()
const result = await autumn.billing.previewMultiUpdate({
customerId: "cus_123",
updates: [
{
planId: "pro_plan",
cancelAction: "cancel_immediately",
},
{
planId: "addon_seats",
cancelAction: "cancel_immediately",
},
],
});from autumn_sdk import Autumn
autumn = Autumn(secret_key="am_sk_test...")
res = autumn.billing.preview_multi_update(
customer_id="cus_123",
updates=[
{
"plan_id": "pro_plan",
"cancel_action": "cancel_immediately",
},
{
"plan_id": "addon_seats",
"cancel_action": "cancel_immediately",
},
],
)curl --request POST \
--url https://api.useautumn.com/v1/billing.preview_multi_update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-version: <x-api-version>' \
--data '
{
"customer_id": "cus_123",
"updates": [
{
"plan_id": "pro_plan",
"cancel_action": "cancel_immediately"
},
{
"plan_id": "addon_seats",
"cancel_action": "cancel_immediately"
}
]
}
'{
"customer_id": "cus_123",
"currency": "usd",
"total": -40,
"subscriptions": [
{
"customerId": "charles",
"lineItems": [
{
"display_name": "Pro seed",
"description": "Pro seed - Base Price (from 18 Feb 2026 to 18 Mar 2026)",
"subtotal": 20,
"total": 20,
"discounts": []
}
],
"subtotal": -20,
"total": -20,
"currency": "usd",
"plan_ids": [
"pro_plan"
]
},
{
"customerId": "charles",
"lineItems": [
{
"display_name": "Pro seed",
"description": "Pro seed - Base Price (from 18 Feb 2026 to 18 Mar 2026)",
"subtotal": 20,
"total": 20,
"discounts": []
}
],
"subtotal": -20,
"total": -20,
"currency": "usd",
"plan_ids": [
"addon_seats"
]
}
]
}
Preview Multi Update
Previews the billing changes of a multi-plan update without making any changes. Returns one core preview per affected subscription.
Use this endpoint to show customers the credits and next-cycle changes of canceling multiple plans before confirming.
import { Autumn } from 'autumn-js'
const autumn = new Autumn()
const result = await autumn.billing.previewMultiUpdate({
customerId: "cus_123",
updates: [
{
planId: "pro_plan",
cancelAction: "cancel_immediately",
},
{
planId: "addon_seats",
cancelAction: "cancel_immediately",
},
],
});from autumn_sdk import Autumn
autumn = Autumn(secret_key="am_sk_test...")
res = autumn.billing.preview_multi_update(
customer_id="cus_123",
updates=[
{
"plan_id": "pro_plan",
"cancel_action": "cancel_immediately",
},
{
"plan_id": "addon_seats",
"cancel_action": "cancel_immediately",
},
],
)curl --request POST \
--url https://api.useautumn.com/v1/billing.preview_multi_update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-api-version: <x-api-version>' \
--data '
{
"customer_id": "cus_123",
"updates": [
{
"plan_id": "pro_plan",
"cancel_action": "cancel_immediately"
},
{
"plan_id": "addon_seats",
"cancel_action": "cancel_immediately"
}
]
}
'{
"customer_id": "cus_123",
"currency": "usd",
"total": -40,
"subscriptions": [
{
"customerId": "charles",
"lineItems": [
{
"display_name": "Pro seed",
"description": "Pro seed - Base Price (from 18 Feb 2026 to 18 Mar 2026)",
"subtotal": 20,
"total": 20,
"discounts": []
}
],
"subtotal": -20,
"total": -20,
"currency": "usd",
"plan_ids": [
"pro_plan"
]
},
{
"customerId": "charles",
"lineItems": [
{
"display_name": "Pro seed",
"description": "Pro seed - Base Price (from 18 Feb 2026 to 18 Mar 2026)",
"subtotal": 20,
"total": 20,
"discounts": []
}
],
"subtotal": -20,
"total": -20,
"currency": "usd",
"plan_ids": [
"addon_seats"
]
}
]
}
Body Parameters
Response
{
"customer_id": "cus_123",
"currency": "usd",
"total": -40,
"subscriptions": [
{
"customerId": "charles",
"lineItems": [
{
"display_name": "Pro seed",
"description": "Pro seed - Base Price (from 18 Feb 2026 to 18 Mar 2026)",
"subtotal": 20,
"total": 20,
"discounts": []
}
],
"subtotal": -20,
"total": -20,
"currency": "usd",
"plan_ids": [
"pro_plan"
]
},
{
"customerId": "charles",
"lineItems": [
{
"display_name": "Pro seed",
"description": "Pro seed - Base Price (from 18 Feb 2026 to 18 Mar 2026)",
"subtotal": 20,
"total": 20,
"discounts": []
}
],
"subtotal": -20,
"total": -20,
"currency": "usd",
"plan_ids": [
"addon_seats"
]
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Body
The ID of the customer to update plans for.
The list of plan updates to apply to the customer.
1Show child attributes
Show child attributes
The ID of the entity to update plans for. Individual updates can override this with their own entity_id.
Controls how the last payment is refunded on immediate cancellation. 'prorated' refunds the unused portion, 'full' refunds the entire last payment.
prorated, full Additional parameters to pass into the Stripe subscription update or cancel call.
Show child attributes
Show child attributes
Response
OK
The ID of the customer the preview applies to.
The three-letter ISO currency code. All amounts are in the currency's major unit (e.g., dollars for USD).
The combined amount due today across all subscriptions (sum of subscriptions[].total).
One preview per affected Stripe subscription. Updates to plans without a subscription (free plans) produce no entry.
Show child attributes
Show child attributes