#ad_agilis-subscriptions

1 messages · Page 1 of 1 (latest)

misty pumice
#

Hi! So you want to pause the subscription and change its billing date?

spring moss
#

Yes.
ex: If a customer bought a 1 month subscription on 15th april and then want to pause their membership from 20th April to 30th April, their next bill/invoice should be charged on 25th May instead of 15th May

misty pumice
spring moss
#

I tried using
Stripe::Subscription.update(membership.identifier, { trial_end: DateTime.new(2022, 4, 25).to_i, proration_behavior: 'none' })

But this just caused the membership to be invoiced immediately when the trial period ended. Could it be because of the proration_behavior?

misty pumice
#

Yes that's expected, the new billing period will start as soon as the free trial end. That's no what you want?

spring moss
#

No. As the customer has already bought the subscription for a month, can't there be any way to extend it by 10 days?

#

and sorry the above code would have been
Stripe::Subscription.update(membership.identifier, { trial_end: DateTime.new(2022, 4, 30).to_i, proration_behavior: 'none' })
executed on 20th April, so that the subscription is given a 10 day trial period?

jolly rampart
#

Hi there 👋 jumping in as my teammate needed to step away. Please bear with me a moment while I get caught up on the context here.

#

So this is a tricky scenario with our subscriptions. I think what you're going to want to do, is add a trial that reaches to the end of the billing period with the extension, so in the scenario you described above that would be May 25th.

When trials end on a subscription, a new billing period begins immediately, there is no way to add a trial in the middle of a period.

spring moss
#

Ok Thanks Toby

jolly rampart
#

Any time! Please let us know if that doesn't seem to fit the scenario that you're trying to build though.

spring moss
#

Sure