#Jonas Reif-subscription-installments

1 messages ยท Page 1 of 1 (latest)

subtle dew
#

Or why not model the Prices objects to just be $10 a month?

tall latch
#

Thanks for the quick reply! ๐Ÿ™‚

If I use those installments, could I also set the end_behavior to not cancel? Since it only should be canceled if the user cancels the subscription before the end of the year.

So to give you one example: You subscribe in january for a yearly subscription. You are charged 10$ every month. If you cancel the subscription in august, the 10$ month are still collected until the end of the year. If the user does not cancel the subscription will be renewed at the end of the year

subtle dew
#

It'll then just become a regular subscription billed annually

tall latch
#

Ah ok. So monthly billing is then just for one year possible. After that it will become billed annually?

Stripe::SubscriptionSchedule.create({
  customer: 'cus_HtQ2OCoIDxTRWn',
  start_date: 'now',
  end_behavior: 'release',
  phases: [
    {
      items: [
        {
          price: 'price_1HJcbcHajoqMmUx0ihk9hSEG',
          quantity: 1,
        },
      ],
      iterations: 12,
    },
  ],
})
subtle dew
#

What is the interval of that Price object?

tall latch
#

Thats just an example.

Stripe::Price.create(
  unit_amount: 10000,
  currency: 'usd',
  product: 'prod_Hh99apo1OViyGW',
  recurring: {interval: 'month'},
)
subtle dew
#

Hmm, it would release onto that Price object so monthly billing would continue

tall latch
#

ok.
But you could then also could cancel it monthly?

subtle dew
#

Yes

#

So monthly billing is then just for one year possible. After that it will become billed annually?
Is this the desired behaviour?

tall latch
#

mhm no the desired behaviour would be as described above:
User should be then in the next yearly subscription with again 12 monthly payments.

#

You know what I mean?

subtle dew
#

How are you handling cancellations in this case? To be clear if you cancel the subscription with Stripe then the intervals will stop regardless of the schedule

#

Sounds to me like you just need to handle this logic on your side:

  • Subscribe to a regular monthly price ($10 p/m)
  • In your app you handle the cancellation logic โ€“ and schedule the cancellation at the date of the subscription creation + 1 year
tall latch
#

Ah ok yes thats also possible ๐Ÿ‘
Thanks, we will try it out...

subtle dew
#

Np!