Skip to main content

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

ParameterType
sessionSession
idstring | number
cancelRequestCancelSubscriptionRequest
query?BasicSubscriptionParams

Returns

Promise<Subscription>