#alex3249837
1 messages ยท Page 1 of 1 (latest)
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
You mean upcoming invoice? No, that's not something we have as a property on the Subscription, but it is something that you can retrieve through a separate API (https://stripe.com/docs/api/invoices/upcoming)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So does every subscription have an upcoming invoice?
Or each time a subscription renews, will an invoice be created?
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
Can you update the date when an upcoming invoice will be processed?
Let's back up for a minute - what are you actually trying to do?
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.
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
You can still set resumed_at with void
So then the invoice will be collected at that resumed_at date?
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
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.
?
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
Ok. I think I understand now.
Will the current_period_end on the subscription be updated?
When this pause action is performed?
๐
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
Wouldn't you want to change the billing period if you are pausing a subscription?
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
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?
No they don't be charged. as long as the Subscription's collection is paused when the Subscription renews on June 15th.
Have you read through https://stripe.com/docs/billing/subscriptions/pause yet?
If not I'd highly recommend reading through that as it outlines exactly how to do this.
Yes, I've read it. I just want to double check my understanding.
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
How can I validate that this works when I'm in testing mode in the Stripe dash?
You can use a test clock
Have you used one before?
Here are the docs that explain how to use them: https://stripe.com/docs/billing/testing/test-clocks
Nope
Ok
So you have to use a test clock to validate the pause behavior works as expected?