Skip to main content
POST
/
v1
/
billing.preview_multi_update
Typescript (SDK)
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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-api-version
string
default:2.3.0
required

Body

application/json
customer_id
string
required

The ID of the customer to update plans for.

updates
object[]
required

The list of plan updates to apply to the customer.

Minimum array length: 1
entity_id
string

The ID of the entity to update plans for. Individual updates can override this with their own entity_id.

Response

200 - application/json

OK

customer_id
string
required

The ID of the customer the preview applies to.

currency
string
required

The three-letter ISO currency code (e.g., 'usd').

total
number
required

The combined amount due today across all subscriptions (sum of subscriptions[].total).

subscriptions
object[]
required

One preview per affected Stripe subscription. Updates to plans without a subscription (free plans) produce no entry.