import { Autumn } from 'autumn-js'
const autumn = new Autumn()
const result = await autumn.billing.multiUpdate({
customerId: "cus_123",
updates: [
{
planId: "pro_plan",
cancelAction: "cancel_end_of_cycle",
},
{
planId: "addon_seats",
cancelAction: "cancel_end_of_cycle",
},
],
});from autumn_sdk import Autumn
autumn = Autumn(secret_key="am_sk_test...")
res = autumn.billing.multi_update(
customer_id="cus_123",
updates=[
{
"plan_id": "pro_plan",
"cancel_action": "cancel_end_of_cycle",
},
{
"plan_id": "addon_seats",
"cancel_action": "cancel_end_of_cycle",
},
],
)curl --request POST \
--url https://api.useautumn.com/v1/billing.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_end_of_cycle"
},
{
"plan_id": "addon_seats",
"cancel_action": "cancel_end_of_cycle"
}
]
}
'{
"customer_id": "cus_123",
"invoice": {
"status": "paid",
"stripe_id": "in_1234",
"total": -20,
"currency": "usd",
"hosted_invoice_url": "https://invoice.stripe.com/..."
},
"payment_url": null
}
Multi Update
Updates multiple plans on a customer in a single request. Currently supports cancel actions (immediately, end of cycle, or uncancel) across one or more subscriptions.
Use this endpoint to cancel or uncancel several plans atomically in one call — for example canceling a main plan together with its add-ons, or plans across multiple entities.
import { Autumn } from 'autumn-js'
const autumn = new Autumn()
const result = await autumn.billing.multiUpdate({
customerId: "cus_123",
updates: [
{
planId: "pro_plan",
cancelAction: "cancel_end_of_cycle",
},
{
planId: "addon_seats",
cancelAction: "cancel_end_of_cycle",
},
],
});from autumn_sdk import Autumn
autumn = Autumn(secret_key="am_sk_test...")
res = autumn.billing.multi_update(
customer_id="cus_123",
updates=[
{
"plan_id": "pro_plan",
"cancel_action": "cancel_end_of_cycle",
},
{
"plan_id": "addon_seats",
"cancel_action": "cancel_end_of_cycle",
},
],
)curl --request POST \
--url https://api.useautumn.com/v1/billing.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_end_of_cycle"
},
{
"plan_id": "addon_seats",
"cancel_action": "cancel_end_of_cycle"
}
]
}
'{
"customer_id": "cus_123",
"invoice": {
"status": "paid",
"stripe_id": "in_1234",
"total": -20,
"currency": "usd",
"hosted_invoice_url": "https://invoice.stripe.com/..."
},
"payment_url": null
}
Common Use Cases
const response = await autumn.billing.multiUpdate({
customerId: "cus_123",
updates: [
{ planId: "pro_plan", cancelAction: "cancel_end_of_cycle" },
{ planId: "addon_seats", cancelAction: "cancel_end_of_cycle" },
],
});
const response = await autumn.billing.multiUpdate({
customerId: "cus_123",
updates: [
{
planId: "pro_plan",
cancelAction: "cancel_immediately",
refundLastPayment: "full",
subscriptionParams: {
cancellation_details: {
feedback: "too_expensive",
comment: "Switching to a competitor",
},
},
},
],
});
Body Parameters
Response
{
"customer_id": "cus_123",
"invoice": {
"status": "paid",
"stripe_id": "in_1234",
"total": -20,
"currency": "usd",
"hosted_invoice_url": "https://invoice.stripe.com/..."
},
"payment_url": null
}
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.
URL to redirect the customer to complete payment. Null if no payment action is required.
The ID of the entity, if the plan was attached to an entity.
Invoice details if an invoice was created. Only present when a charge was made.
Show child attributes
Show child attributes
Details about any action required to complete the payment. Present when the payment could not be processed automatically.
Show child attributes
Show child attributes