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
| When | Description |
|---|---|
| now | Immediately cancels the Subscription |
| end | Cancels the Subscription at the end of it's billing period |