v1

latestOpenAPI 3.1.02026-07-265817860.8 KB
billing

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.

post/v1/billing.multi_update

Headers

x-api-versionstring required

Request body

customer_idstring required

The ID of the customer to update plans for.

entity_idstring

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

Example request

{
  "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"
    }
  ]
}

Response

OK

customer_idstring required

The ID of the customer.

entity_idstring

The ID of the entity, if the plan was attached to an entity.

payment_urlstring nullable required

URL to redirect the customer to complete payment. Null if no payment action is required.

Example 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
}