Function: cancelSubscription()
cancelSubscription(
session
,id
,cancelRequest
,query
?):Promise
<Subscription
>
An involuntary subscription cancelled due to max retries reached will trigger the charge/max_retries_reached webhook. If this leads to the subscription being cancelled, the subscription/cancelled webhook will trigger.
Parameters
Parameter | Type |
---|---|
session | Session |
id | string | number |
cancelRequest | CancelSubscriptionRequest |
query ? | BasicSubscriptionParams |
Returns
Promise
<Subscription
>