#alex3249837

1 messages ยท Page 1 of 1 (latest)

burnt viperBOT
marble crag
#

Can you clarify why you expect current_period_end to be updated?

#

With pause_collection subscriptions we don't actually change any of the subscription cycling logic - the subscription will still renew as expected, but the invoices that are generated will be kept as drafts

twin stag
#

Hmm

#

Does the subscription have a next order property?

marble crag
twin stag
#

So does every subscription have an upcoming invoice?

#

Or each time a subscription renews, will an invoice be created?

marble crag
#

Subscriptions that are scheduled to be canceled wouldn't have an upcoming invoice

#

and yes, each time a subscription renews an invoice would be created

twin stag
#

Can you update the date when an upcoming invoice will be processed?

marble crag
#

Let's back up for a minute - what are you actually trying to do?

twin stag
#

A customer has a monthly subscription where they receive a box of tea each month. Let's say that a customer received a box of tea in May, and they have an upcoming shipment in June. But a customer has a lot of tea left, so they want to pause the subscription/shipment for June (delay receiving anything for a month or skip to only receive something in July).

#

I want to be able to pause the subscription/shipment for the subscription by one cycle for the customer.

marble crag
#

Gotcha - then using pause_collection is likely your best option, but I'd actually suggest using pause_collection.behavior: void instead of keep as draft. That'll create the Invoice in June, but immediately void it (so that no payment is collected and the invoice wono't be paid).

#

There isn't really a way to "update the date" that an upcoming invoice will be processed - simplest thing would be to just void whichever invoices you plan on skipping

twin stag
#

Can I still set a "resumes_at" value?

#

Or will that not work with the void behavior?

marble crag
#

You can still set resumed_at with void

twin stag
#

So then the invoice will be collected at that resumed_at date?

marble crag
#

No, that's just when the Subscription would be "un-paused". The only thing that'll happen on that date is pause_collection will be cleared out. When the next subscriptoin renewal date comes along after being resumed then the next invoice will be created and finalized like normal

#

So to use your example, assuming your subscription renews on the 1st, if you set your subscription to resume mid-june (AFTER the june invoice was created), then in july the next Invoice would be created and charged for like normal

twin stag
#

Ok, so say the monthly subscription ships on June 13, so I set resumes at to be July 13th. The invoice would be generated but the behavior voided until July 13th.

#

?

marble crag
#

Yes, the June 13th invoice would be generated and voided immediately. If the resumes_at timestamp is BEFORE the July 13th invoice is created then that invoice will be created normally. If it's AFTER then the invoice will be voided

burnt viperBOT
twin stag
#

Ok. I think I understand now.

#

Will the current_period_end on the subscription be updated?

#

When this pause action is performed?

wild python
#

๐Ÿ‘‹ stepping in as Karbi needs to step away

#

Catching up

twin stag
#

๐Ÿ‘

wild python
#

The current_period_end should not change when you are handling pause_subscription

#

Since you aren't actually changing the billing periods at all

#

Just adjusting what happens to the Invoices that are cut during that time

twin stag
#

Wouldn't you want to change the billing period if you are pausing a subscription?

wild python
#

Not sure what you mean? You are pausing collection here, not updating the Subs billing period.

#

That would be a different action if you want to do that.

#

The billing period will still update as normal at each renewal.

#

But it won't be moved/adjusted from setting pause_collection

twin stag
#

So will a customer be charged?

#

A customer has a monthly subscription that ships on the 15th of each month.

#

And say they have a lot left over from May 15th's shipment

#

So they want to pause to not receive a shipment for June 15th

#

but receive shipment on July 15th

#

How would I do that with Stripe endpoints?

wild python
#

No they don't be charged. as long as the Subscription's collection is paused when the Subscription renews on June 15th.

#

If not I'd highly recommend reading through that as it outlines exactly how to do this.

twin stag
#

Yes, I've read it. I just want to double check my understanding.

wild python
#

Gotcha okay

#

Then yeah you just set pause_collection.behavior: void and if you already know when you want it to resume then you can set resumes_at as well

twin stag
#

How can I validate that this works when I'm in testing mode in the Stripe dash?

wild python
#

You can use a test clock

#

Have you used one before?

twin stag
#

Nope

#

Ok

#

So you have to use a test clock to validate the pause behavior works as expected?

wild python
#

Well you don't have to

#

But it is the easiest way, yes.

#

Otherwise you want to set your billing period to end in a few minutes and then enable pause_collection

#

That would be the way to handle testing it without a test clock

twin stag
#

Ok

#

Thank you for your help!