Skip to main content
Version: v3.2.0

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

const subscription = await salable.subscriptions.cancel(
'41cf33a2-136e-4959-b5c7-73889ab94eff',
'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