#anthonyg-schedules

1 messages Ā· Page 1 of 1 (latest)

proud aurora
#

let's do a new one, you have numerous separate threads at this point. What's the request id?

urban tusk
#

Cool. req_RHctje0EzVgABA

#

So got stuff setup on a node server now instead having to use fetch with this other platform I was using. That way I can also do the webhook requests in the same place. Anyway, was wondering on that request why the billing anchor date was Oct 3rd, which was the start date for the first phase.

#

Trying to work through getting a sub setup so I can create these separate invoices for back billing using invoice items, etc.

#

If I don't backdate the sub when creating the schedule, it doesn't create a sub ID until the start date. So if I set the start date for the next upcoming billing date of Dec 3 I can't get a sub ID to create and pay the back invoice like I was mentioning I'd try yesterday.

#

But when I back date it creates some bogus period invoice. Guess I could just delete that as soon as the sub is created and then reset the billing anchor on the sub itself to try and get the periods to align right for Dec 3rd forward. Right now it's setting the start date to Oct 3rd and the end date to Jul 3rd which is what I want, but the next invoice to bill is based on today's date.

#

Looking at the request all the start date and end dates of the phases look to be what I want them to be.

#

First one Oct 3 - Dec 3, then Dec 3rd - Jan 3rd... So not sure what the invoices are doing when you look at them in the dashboard for the first one and the next upcoming.

proud aurora
#

sorry there's a lot here

urban tusk
#

I know, sorry!

proud aurora
#

I'm really trying to help but it's like trying to fit a square in a circle at this point 😦

urban tusk
#

I'm gonna turn the square into a circle or die trying! hahaha

proud aurora
#

Guess I could just delete that as soon as the sub is created
nope, you can not delete a subscription invoice at all. You could void it I guess but it's just another "abuse" of our API/product to fit your need

urban tusk
#

Gotcha

proud aurora
#

if you want a subscription id early, put the subscription on a trial period until their next invoice

#

that way the schedule will create a subscription in a trial state and you have what you'd need

#

but the invoice's periods will still be bogus for that "missing one" there's no real way around it

urban tusk
#

ok, so does that mean I need to create the subscription first and attached a schedule to it after, or can I set the trial when creating the schedule?

proud aurora
urban tusk
#

Ok so if I set a trial end date on the first phase it will generate a sub ID right away? Just want to make sure I’m understanding what you said correctly. Because it doesn’t to this if I set the start date to a date in the future.

proud aurora
#

correct it will

urban tusk
#

Ok, so it creates a trial period invoice for $0 with a description of Oct 3 - Dec 3. That description is exactly what I'd want for the back dated period., Not sure why it does it this way only if I set the trial end date on the first phase. Seems like it should be that way even without the trial based on the phase dates I set.

#

req_IeLK2I9lMKwedS

proud aurora
#

that one you passed start_date: '2021-10-03'

#

right?

urban tusk
#

Wait I passed that on the other one too, or so I thought. I didn't change anything this time from last except the trial date.

proud aurora
#

I'm sorry, it's the usual thing you're extremely deep in this and I'm not

#

Like what happened with the previous one? I thought you said it hadn't started at all yet?

urban tusk
#

Hahah, sorry. So the first req ID I sent was doing something whack with the first invoice. The second req id was for another attempt with the trial end set on the first phase which set the invoice dating how I would expect, but it was for $0 because it was a trial. Not sure why the first req didn't do the same dating as the second. First: req_RHctje0EzVgABA. Second: req_IeLK2I9lMKwedS.

proud aurora
#

so that first request has a sub right? You started the thread saying there's no sub so I'm confused

#

can you explicitly expand the subscription and its latest invoice on creation?

urban tusk
#

Here's the one with a trial end date set with the sub and invoice expansion: req_7Zg8ceGU0lFVaF

#

Here's the same thing just without the trial end set (has the whack first invoice dates): req_m9zXTTiDROIw91

#

Seems to me that the second should be the same as the first one in terms of the dates for the first invoices.

#

Why does setting the trial date make the difference.

proud aurora
#

looking

#

hum that one also starts on Oct 3 right? It's just that it does proration because it's still anchored on a different billing cycle

#

basically the trial one does nothing it just anchors on a trial till Nov 5 while the other one is prorating for the back period you were missing

urban tusk
#

Yeah they both start on Oct 3. So how can I anchor the non trial one to a different billing cycle date? Or why does it not anchor the same dates as the trial one? The trial one doesn’t have anything about Nov 5th in it other than the creation date. The non trial one uses the creation date as the anchor date even though I specify a phase start date of Oct 3 and anchor to the phase start. Seems not right to me but maybe I’m missing something.

proud aurora
#

the trial one has trial_end which is a clear "this is where you anchor the billing cycle please"

#

the non trial one has nothing which implies "please anchor to today and start the billing cycle right now"

urban tusk
#

Yea but the non trial one is anchoring to today! Even though I am telling it to anchor to the phase start which is set for Oct 3. And it’s not doing that. Seems like an error or bug to me, unless there’s some other explanation that’s alluding us.

proud aurora
#

yeah I don't think that works the way you think it is with backdate unfortunately, I think that only anchors to "now". Try passing a different billing cycle anchor explicitly and see if that solves the issue?

#

without sounding like a broken record, you are still trying to do something not supported, if you anchor to > 1 month you will have them overpay

urban tusk
#

You can’t anchor schedule phases to a specific date. Only to phase start or automatic. I think I’m not doing anything not supported. I think it actually just comes down to needing to set a trial date to tell the system explicitly like you said what date you want billing to start on and anchor to from that point forward. The system seems to handle back charging based on a predefined proration system which just doesn’t fit our business model. So we have to go about it through the separate invoices approach which I’m going to try next now that I’ve got the sub working with the trial date piece. It would be nice if stripe became more flexible to accommodate non daily proration calculations. If you could specify the proration method it would definitely be more flexible. We just don’t divide our products by a daily or hour or minute usage proration schedule. Aside from that, simply being able to set an explicit ā€œstart billing on this dateā€ param would make back dating a sub much more intuitive. Having it start billing from the date you start the sub seems forced. But that’s I guess what the trial allows you to do. Just can’t let the system auto generate the past invoice that way. Will get to work on that part next. I do appreciate all your help very much by the way! It’s certainly getting me somewhere here.

proud aurora
#

I think I’m not doing anything not supported
You're trying to do something unsupported though

You can’t anchor schedule phases to a specific date. Only to phase start or automatic
ah yes I always forget that it has the same name but a really specific behaviour 😦

#

damn I just had a thought as I typed but it doesn't work lol

#

I was hoping I could start a phase Oct 3 - Nov 3, then put it on a trial until Nov 15, then charge and wait for Dec 3

#

but you can't pass a phase that ended, even to start

urban tusk
#

Yeah I tried that too! 😩

#

Trials are a legit way to re configure things. Also, It’s too bad you can’t specify a billing anchor explicitly on schedules like you can for subs.

proud aurora
#

yeah, trials mess up with revenue recognition too though

#

I'm sorry I'm running out of hacks ideas at this point šŸ˜