Skip to main content
Version: Node SDK

Cancel a Subscription

Cancels a Subscription with options for when it terminates.

Code Sample

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

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

await salable.subscriptions.cancel('ce8cc0cb-a180-4d90-985b-0890d5ac6cbb', { when: 'end' });

Parameters

subscriptionUuid (required)

Type: string

The UUID of the Subscription to be canceled

options (required)

Type: CancelSubscriptionOptions

OptionTypeDescriptionRequired
whenenumnow: Immediately cancels the Subscription. end: Cancels the Subscription at the end of it's billing period

Return Type

Returns void