Skip to main content
Version: Node SDK

Change a Subscription's Plan

Move a Subscription to a new Plan. Proration behaviour can optionally be set.

Code Sample

import { Salable } from '@salable/node-sdk';

const salable = new Salable('{{API_KEY}}');

const changeSubscriptionPlan = await salable.subscriptions.changePlan('{{SUBSCRIPTION_UUID}}', {
planUuid: '{{PLAN_UUID}}',
});

Parameters

subscriptionUuid (required)

Type: string

The uuid of the Subscription that is being moved

config (required)

Type: SubscriptionsChangePlanBody

ParameterDescriptionNotesRequired
planUuidThe uuid of the Plan the Subscription is moving to
prorationProration behaviourcreate_prorations: Will cause proration invoice items to be created when applicable (default). none: Disable creating prorations in this request. always_invoice: Always invoice immediately for prorations.

Return Type

For more information about this request see our API documentation on Subscription Object