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}}');

await salable.subscriptions.cancel('{{SUBSCRIPTION_UUID}}', 'end');

Parameters

subscriptionId (required)

Type: string

The uuid of the Subscription to be canceled

when (required)

Type: end | now

WhenDescription
nowImmediately cancels the Subscription
endCancels the Subscription at the end of it's billing period

Return Type

Return void