#Sebastian-draft-invoices

1 messages · Page 1 of 1 (latest)

dim sedge
#

Hi there! Yes I believe that should work fine as the draft invoice should pick up any new line items when the invoice is finalized. I'd recommend testing this out to make sure though.

rancid fulcrum
#

I mean I do not plan on adding new line items.

Maybe a bit more context would help. We want to schedule price changes for our users but by the end of their billing cycle. Once we get the invoice.created web-hook we would change the existing price for a new one. Do you think once the invoice leaves the draft state and officially opens that would be captured??

Sorry for the super specific question, I'll give it a try of course but wanted to ask here before going all in.

dim sedge
#

Is there a reason you are not using Subscription Schedules here to schedule updates?

rancid fulcrum
#

did not know that existed I believe

dim sedge
rancid fulcrum
#

thank you so much!

dim sedge
#

Sure thing!

rancid fulcrum
#

reading through it, I'm a bit unsure if it is exactly what we want, got a couple of questions on it

dim sedge
#

Sure thing

#

Happy to help

rancid fulcrum
#

Regarding subscription schedules, if we were to create SubscriptionSchedules from already existing subscriptions we would first need to use the from_subscription param right?

#

and what we really want is to schedule a price change that is permanent, so we don't really want iterations or an end-date, but we would still need to create a phase right?

dim sedge
#

Yep both of those are correct

#

The sub schedule in this case will be pretty simple

#

You will just have two phases, one for the current phase and one for the new phase

rancid fulcrum
#

ohh so I mark the first phase with the end-date of the customer's current billing period end??

#

will the invoice take it into account by then? We need to make sure the charge is based on the new price.

What I have been working to avoid is that the customer pays their old price and the switch happens after that. We want no refunds or prorations. Literally a scheduled price switch.

dim sedge
#

The way Subscription schedules work is that "Phase 0" is always the current phase, then you add a new phase for what you want to schedule in the future. If you set the new phase to occur at the end of the billing period then the new invoice will be cut with the updated price.

rancid fulcrum
#

Perfect!

And if I create a new SubscriptionSchedule on a subscription that already has one, would it replace the old one?? Or do I need to retrieve it and update it??

dim sedge
#

Retrieve and update in that case.

#

I actually haven't tested that

#

But almost positive you will hit an error if you already have a Sub Schedule attached to a Sub and attempt to attach a new one

rancid fulcrum
#

I just saw something, maybe I can release the existing one and create a new one on top. Just so I do not need to handle SubSchedules on our systems too

#

Thank you so much for this! it's been really clarifying

dim sedge
#

👍