cancelSubscription abstract method

Future<void> cancelSubscription({
  1. required Object customer,
  2. bool atPeriodEnd = false,
})

Cancel the customer's subscription. When atPeriodEnd is true, the subscription remains active until the current billing period ends and is then revoked; when false, it is revoked immediately.

Throws UnsupportedError when the provider does not support deferred cancellation.

Implementation

Future<void> cancelSubscription({
  required Object customer,
  bool atPeriodEnd = false,
});