#andrea-skuola-sub-schedule
1 messages · Page 1 of 1 (latest)
I had problems in the past putting the expiration date on subscriptions to get customers pay installments, so I'm trying with the subscription schedules. I need to know this subscription how many subsequent bills it will have after the first payment that has already been made
sub_1LKLjlK6jaF9EpCmhW3r5Otu
I created the subscription and attached the schedule to it
Looks like the schedule has set the subscription to cancel following the 2 billing periods: https://dashboard.stripe.com/test/logs/req_OyGNlxAAtXMEzr
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
See cancel_at field: 2022-09-11 12:29:17
You should just test this with billing clocks. You can fast forward to that date to see if the behaviour is as you need: https://stripe.com/docs/billing/testing/test-clocks
when I add some time with test clocks, the whole test app goes on, right? For example, you cannot select just one subscription to go ahead with time
all active subscriptions will go ahead
Nope, works on a per subscription/customer basis
I have to create a customer and a subscription specifically for the test clock?
can't use those that already exist?
Yep, should work!
which of the two scenarios?
Actually, sorry. You'll need a new customer to associate it with the clock. This is all laid out in the docs: https://stripe.com/docs/billing/testing/test-clocks#setup-simulation
can u tell me why it tells the date must be in the future but the date passed is already in the future? req_8BQljSvtJ2FB0q
Hi there 👋 jumping in as my teammate needed to step away. That request is being made for a test clock scenario, and the provided timestamp is before the current time of the test clock.
oh ok
I had problems in the past putting the expiration date on subscriptions to get customers pay installments, so I'm trying with the subscription schedules and i think now it will work properly. Now i have some subscription like this sub_1LKMuNK6jaF9EpCmfPNC2TVx: 2nd installment (the last) is lower than the 1st probably because it sees that the subscription expire only 7 days after and make customer pay only that period
How can I fix this situation?
I want the last installment is same price like others
tell me if its clear
Taking a closer look
thanks
To clarify, the Subscription that you referenced doesn't look like it's attached to a Subscription Schedule, it looks like you provided a value in the cancel_at parameter when creating the Subscription.
yes, for new subscriptions I will use subscription schedule. For the previous ones i have situations like the subscription sent and I wanted to know how to fix the problem
It's not possible to force Subscriptions to avoid prorating when using cancel_at.
ok, are there any other ways to fix?
for example adding a schedule also for subscriptions with the reported problem?
Have you tried using cancel_at_period_end instead of cancel_at? You won't be able to if your desired end date is past the end of the current billing period though.
the subscriptions I am talking about have not yet expired, so they can be changed I think
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I am not interested in canceling the subscription, I just have to change the price of the last invoice to the same price as the previous one
Sorry, I'm confused, if you're not interested in cancelling the subscription, then why did you set cancel_at?
yes i use cancel_at to cancel subscription but the question is not about that
for example I can add days to the cancel_at and I saw that the price of the last installment increases, but it is never as precise as the previous installment
i need always same price to installments
Then you want to avoid using cancel_at. When using that field there is no way to avoid having our system calculate a prorated amount for the billing period.
In fact I'm no longer using it, I was talking about the old subscriptions created with the cancel_at, how can I fix the problem?
Just to make sure we're aligned, can you restate what the problem is, and what you're looking for as a fix to that behavior?
Before I used cancel_at to manage subscriptions with installments, now I have switched to scheduling subscriptions because it is more safe. But I still have active subscriptions (previously created with cancel_at) and therefore have the last installment lower than the others. I wanted to figure out how to fix old subscriptions that are still with cancel_at field
And did you try using cancel_at_period_end? Since that approaches cancels at the exact end of a billing period, there are no prorations when using that approach.
but what is the billing period for the subscription ID i linked?
That's shown by the current_period_start and current_period_end values that you can find on the Subscription:
https://stripe.com/docs/api/subscriptions/object#subscription_object-current_period_end
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
but this flag will not resolve the situation because an extra invoice is not created
it's all true
only the price is wrong
Hey, toby has to step out in a minute. I am catching up on this thread and can help out in a minute
ok, ask me questions if its necessary, I know that it is difficult to understand
Okay so the situation more or less is that this subscription has already charged for a full month 7/11-8/11, and the next invoice is currently for just one fourth of the normal price, because it is currently set to only run for one more week. And you are looking to push that cancel at date to be at the end of the subscription's current period?
exactly, i tried to add days to cancel_at date, but that's not precise (the price is not the same like other installments)
I was wondering if maybe I could add the schedule and solve it but I don't know if the invoice price is recalculated
That is surprising. We prorate to the minute I believe so if you set cancel_at to the current_period_end (or if you unset cancel_at and set cancel_at_period_end to true), the next invoice should be updated to show the full price that you set
can I make these changes from the dashboard to see if it works?
Yes, the dashboard should let you set the subscription end
I created a test subscription with same problem i have
sub_1LKOXoK6jaF9EpCmeM0bCHzw
the last installment is lower price that other
but if i set end date to Sept 11 the price will be €34.87
even with prorate flag to false
We prorate down to the minute so I think it may be imprecision in the timestamp that the dashboard sets. If you set this via the API I think it should be accurate enough
you prorate even if the flag is false?
Also to be clear, proration only really applies when you are changing the underlying price itself. So like if you changed from $5 for a week to $10 for a week, that can create a proration. But here the price is changing to reflect whether you are charging at this price for a week or a whole month, which is something slightly different.
can you check now the subscription?
i set the end date to the current_period_end
but the behavior is not fair there should be another invoice
probably i need to add +1month to current_period_end
Yes, if you want a third invoice there, you would need to add another month to the cancel at time.
I needed the second invoice that putting cancel_at = current_period_end did not create it, adding a month yes
you can see i already paid it
and there are no subsequent bills
Gotcha, I see why you wanted to do schedules instead of cancel at. Schedules would likely be easier here.
Circling back to this question: yes. If you create a subscription schedule for your existing subscription and push back when the subscription ends, the invoice should recalculate here to charge for the full month.
Here is the code to create a schedule on an existing subscription if you haven't seen it. https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases#existing-subscription
And after you create the subscription you can update it to have an end_behavior of cancel and set iterations to however many full cycles you want the subscription to go through before cancelling https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-phases-iterations
I have to step out in a but but my colleague @hardy walrus will be able to help with any subscription schedule questions