#thomas-schedule-phases

1 messages ยท Page 1 of 1 (latest)

undone mirageBOT
fervent tendon
#

Hi ๐Ÿ‘‹

#

Are you using the API to make these changes?

cursive tide
#

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.

fervent tendon
#

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.

cursive tide
#

Yeah I'd like to change the period end field via the API back now.

#

Do I need to apply a new subscription schedule?

fervent tendon
#

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

cursive tide
#

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.

fervent tendon
#

Thank you for this

#

So are you trying to restore the second phase?

#

That ran from 10-1 to 10-26?

cursive tide
#

yeah

#

Actually

#

I'm trying to restore the previous state

#

It should just normally renew on 10-26

fervent tendon
#

So are you trying to reset the end date of the current phase and reset the billing cycle?

cursive tide
#

just adjust the end date of the current billing cycle without doing any prorations etc.

fervent tendon
#

And when you attempt to do that with the Dashboard editor you get an error message?

cursive tide
#

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?

fervent tendon
#

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

cursive tide
#

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

undone mirageBOT
cursive tide
#

I guess my only option now is to recreate the subscription with a new billing_cycle_anchor

errant vapor
#

๐Ÿ‘‹ @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

cursive tide
#

I would prefer to do it via API if possible

#

I'm not going to touch the dashboard anymore

errant vapor
#

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

cursive tide
#

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.

errant vapor
#

And you don't care about ~anything else on that Subscription? Or you might make changes between now and Oct 26?

cursive tide
#

Let's say I don't care, then what are my options?

errant vapor
#

The easiest: Put the Subscription on a trial period until Oct 26.

cursive tide
#

Okay. And if I do care? Right now I'm thinking:

#
  1. Cancel the subscription 2) Recreate with billing_cycle_anchor on 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.

errant vapor
#

yep that works too. You can avoid #3 by passing proration_behavior: 'none' on #2.
Try it in Test mode

cursive tide
#

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.

errant vapor
#

Can you give exact code and a concrete example?

cursive tide
#

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

errant vapor
#

looking

#

Give me a few minutes to try and repro

cursive tide
#

Thanks

errant vapor
#

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

cursive tide
#

Thanks

errant vapor
cursive tide
#

Interesting, yeah it makes no sense to offer that option then.