#thomas-schedule-phases
1 messages ยท Page 1 of 1 (latest)
No. The frontend UI messed it up.
I created a subscription schedule using the API, and then realized the phase was wrong, and then used the UI to remove the pase.
Now after I used the UI it 1) cleared the metadata, 2) set it to auto-cancel on Oct 1st, and 3) changed the period end date. I managed to fixt he first two things but not the last one.
evt_0Nvisf4rOYBvHyzsJm9WY5Wv is the evt from the UI that messed it up. You can see in the previous data which fields it changed.
And you can see the subscription has no schedule anymore.
Okay we are focused on developers integrating with Stripe APIs here so that is the direction our advice normally takes. I can take a look to see if I can figure anything out here though.
Yeah I'd like to change the period end field via the API back now.
Do I need to apply a new subscription schedule?
When you look at the Subscription in the Dashboard, can you share the requests that were the latest changes you made? There are a lot of modifications to this subscripton and it isn't clear which is which
I created a schedule in req_oN9idmwzjKNnpG, then I removed the future phase in req_IzoRvopjPnImWU , which for some reason set cancel_at, then I undid cancel_at in req_cc4noZgysJ0Ihh, then reapplied the metadata in req_M63UxHHYMSro4a
Now I'd like to restore the period renewal date to be the regular annual date.
Thank you for this
So are you trying to restore the second phase?
That ran from 10-1 to 10-26?
yeah
Actually
I'm trying to restore the previous state
It should just normally renew on 10-26
So are you trying to reset the end date of the current phase and reset the billing cycle?
just adjust the end date of the current billing cycle without doing any prorations etc.
And when you attempt to do that with the Dashboard editor you get an error message?
let me see
It already says duration Forever
Let me try adding a new subscription schedule and see what it's gonna do...
yeah I'm still not getting the desired result
The subscription duration is set to forever so I can't change the renewal date in the dashboard
And looks like I can't change billing_cycle_anchor do an arbitrary timestamp
*to
So is that a bug in the dashboard where removing a phase would change the renewal of the subscription?
Where it says "Forever" is where you set the end date. You can then check the box to reset the billing cycle and turn off prorations. It will generated an immediate invoice to account for the changes in billing though. You can then add a new phase that will start when that ends
On Oct 26 I could set it to reset the billing cycle. But they are still about to get invoiced on Oct 1, which I don't want
I guess my only option now is to recreate the subscription with a new billing_cycle_anchor
๐ @cursive tide unfortunately we're a bit unclear how to make this happen on the Dashboard. I would recommend talking to our support team directly for help: https://support.stripe.com/contact
thomas-dashboard-subscription
I would prefer to do it via API if possible
I'm not going to touch the dashboard anymore
Gotcha so let's take a step back in that case. What are you trying to do exactly in the API to that Schedule?
thomas-schedule-phases
At this point, I want to push the renewal date forward from Oct 1 to Oct 26
The annual subscription is supposed to bill on Oct 26.
And you don't care about ~anything else on that Subscription? Or you might make changes between now and Oct 26?
Let's say I don't care, then what are my options?
The easiest: Put the Subscription on a trial period until Oct 26.
Okay. And if I do care? Right now I'm thinking:
- Cancel the subscription 2) Recreate with
billing_cycle_anchoron Oct 26, 3) remove the charge it will create for the period from now until Oct 26.
Then I'll have a paying subscription right away.
yep that works too. You can avoid #3 by passing proration_behavior: 'none' on #2.
Try it in Test mode
Thanks, will try.
I have a different question...
It's about canceling subscriptions with prorate=ture (but not invoice_now=true). What is the supposed behavior? Right now it appears that it creates prorations but then deletes them.
Can you give exact code and a concrete example?
yes one moment
It happened on a customer here, where I canceled the subscription with prorate=True in req_N6bvN7oLfPJ1zE. It then created this proration item in req_N6bvN7oLfPJ1zE. But the proration item was deleted for no apparent reason in evt_0NuhTM4rOYBvHyzsbxP9d6DA.
*it created the proration in evt_0NuhTM4rOYBvHyzsch6DAaBu
Thanks
It's weird I'm trying this exact flow and it's working fine for me, but yours is deleting the InvoiceItem and the "source" of the Event is automatic (which means internal to our system) but I don't get why. Will pair with my team but will take a bit more than a few minutes
Thanks
@cursive tide okay so https://stripe.com/docs/api/subscriptions/cancel does say that pending proration invoice items would be deleted so it seems to be expected even if it doesn't really make much sense to me
Interesting, yeah it makes no sense to offer that option then.