koudoku icon indicating copy to clipboard operation
koudoku copied to clipboard

allow cancellation at end of billing period

Open mediavrog opened this issue 9 years ago • 5 comments

see https://stripe.com/docs/subscriptions#canceling-a-customers-subscriptions

usage example: subscription.rb

  # we want customers to use the paid subscription until the paid billing period
  def prepare_for_cancelation
    self.cancel_at_period_end = true
  end

mediavrog avatar Dec 15 '15 06:12 mediavrog

LGTM

pcboy avatar Dec 15 '15 06:12 pcboy

LGTM LGTM

:+1: :-1:

le-doude avatar Dec 15 '15 06:12 le-doude

+1 @andrewculver - Is this ready to be merged?

ACPK avatar Jul 18 '16 16:07 ACPK

@mediavrog Hey, sorry for the delay getting back to you on this! I see the plumbing for actually setting the flag on Stripe, but how were you keeping track of the "still active" status of the subscription in the app? Off the top of my head, even if you send this flag to Stripe, the Rails app will still see the subscription as being canceled. Am I missing something?

andrewculver avatar Dec 19 '18 17:12 andrewculver

Per https://stripe.com/docs/billing/subscriptions/cancel#events.

This PR looks safe to me since it will go through canceled webhook at this end of the billing period instead immediately. status will stay unchanged.

kwent avatar May 24 '20 10:05 kwent