Ana içeriğe geç

cancelSubscription

Cancel a subscription. 🔐 This method requires authorization.

Description

This method cancels the current user's subscription identified by its marker. It returns a Promise that resolves to true if the subscription was cancelled, or an IError object if there was an issue.

Subscriptions.cancelSubscription(

body*, body.marker*

);

Parameters schema

Schema

body(required): ICancelSubscription
Subscription body. Example: { marker: "premium" }

body.marker(required): string
Subscription marker
example: "premium"

Examples

Minimal example

const response = await Subscriptions.cancelSubscription({ marker: 'premium' });

Example response

true

Response schema

Schema: boolean

boolean: boolean
Returns true if the subscription was cancelled.
example: true