Skip to main content
POST
Typescript (SDK)

Body Parameters

Response

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.4.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.

refund_last_payment
enum<string>

Controls how the last payment is refunded on immediate cancellation. 'prorated' refunds the unused portion, 'full' refunds the entire last payment.

Available options:
prorated,
full
subscription_params
SubscriptionParams · object

Additional parameters to pass into the Stripe subscription update or cancel call.

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. All amounts are in the currency's major unit (e.g., dollars for 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.