#anthonyg-invoices

1 messages · Page 1 of 1 (latest)

ebon glade
#

No, there is no way to control the specific timestamp you want an invoice to be finalized.

round basin
#

So if I'm creating a sub schedule and want the period for the first installment to start on 10/3/21 and be one iteration (which in this case would end it on 2/3/22) if I set a trial date on the phase to be 12/3/21 will that make the period that shows up in the description in the Stripe invoice be Oct 3 - Feb 3, but have it auto advance the first payment attempt on 12/3/21?

ebon glade
#

Are you saying you'd have a trial from 10/3/21 - 12/3/21

round basin
#

Shoot no, I was trying to have the trial end be the date the phase processes or advances the invoice for it, but the billing period be the original billing period of 10/3/21 - 2/3/22

ebon glade
#

Yeah I don't think that's going to work, once the trial ends that will reset the billing period so the next Invoice will only be for 12/3 - 2/3

#

Why specifically do you want to delay the finalization like this? Maybe we can come up with a workaround

round basin
#

Well, we create all our subs manually and I want to set it to bill the customer at a specific date but have the period be something not based on the start date or end date.

ebon glade
#

Do you send these invoices to your customer (through email ) or are they charge automatically?

round basin
#

Charged automatically

ebon glade
round basin
#

So is there a way to "schedule" the auto advance to turn back on?

#

As in I don't want to have to manually process the advance requests when they're needed.

ebon glade
#

No, once you turn it off it would be up to you to turn it back on unfortunately.

round basin
#

I've used the pause sub behavior before. Maybe I can use that here and then just create and process an invoice when the sub unpauses based on the date I want it to process payment.

ebon glade
#

It's up to you, but personally I wouldn't recommend it and when the subscription is unpaused you'd still have to mark the invoices back to auto_advance: true if they were in draft when the subscription was paused

round basin
#

Well, I guess I was thinking I wouldn't set the invoice auto_draft off but create an invoice when the sub unpauses and advance it manually right then and there.

#

Can manage it with a webhook for subscription updated. Any reasons why this would be unreliable though that I'm not thinking of?

#

Don't spend extra time thinking about it actually. I'll try it out and see if it works ok. If there's a different way you can think of to do what I have in mind let me know though.

ebon glade
#

Was going to ask you to lay out the full flow for me again, but yes, if you have the bandwidth definitely test it out and see if it works

#

Personally, I wouldn't recommend this because it's a weird workaround (it may have affects on your MRR or other reporting things), but if this is a hard requirement for you then it may be your only optin

round basin
#

Well the general flow is that I have set billing period for a sub that has 2 payments. We have an annual amount we bill and divide it for our customers into a certain number of payments. So for the people paying two payments we usually bill them on Oct 3 and Feb 3, but if sometimes we get their account started later or whatever, but don't need or want to prorate because they will still get the full services. So the periods are the same but the payment dates are different.

#

For example, I've got a customer that needs to be billed first payment on 12/3 and second on 4/3, but the period for all billing is still 10/3 - 7/3. So not sure how to handle these cases where the start date would affect what the invoice description says about what period it's for.

round basin
#

Is there any further info on the webhook invoice.payment_action_required
? I'm wondering if I can use this to process payments at different dates.

ebon glade
#

Sorry missed that follow up - give me a couple mi nutes!

#

Okay so circling back to using the event invoice.payment_action_required - would you be using this in combination with turning auto advancement off? Because otherwise, we'll still attempt to charge for the Invoice automatically

round basin
#

Yeah, I was thinking that's how I'd do it, but I wasn't sure exactly what this hook was capturing from the description. Can you explain it to me a little bit?

#

When does it trigger exactly in other words?

ebon glade
#

Ah shoot, I was misremember this event - I don't think this will work. This event is specifically when additional actions (like authentication) are required to complete payment.

round basin
#

Ok, yeah I was wondering if it was something like this. So why not use pause sub? You said it might mess up MRR, but would it if the invoices I generate on the "off" payments are attached to the sub? Is it just when they're paused they're not counted in MRR or something?

ebon glade
#

I'm not an expert on MRR, but I know that paused subs are treated differently in our calculations

round basin
#

Right

#

It's too bad we can't just set a processing date on a schedule phase.

#

Sometimes we want to process payments at off dates and it seems real hard to do that with the current tools,

ebon glade
#

Yeah, it's a use case that isn't well supported right now

#

I do still think the cleanest solution for you is to disable auto advancement for the invoice, and then build logic on your end to charge for it when you need to

round basin
#

For sure. I feel like Stripe got bit on the metered billing type subscription businesses models.

#

And that's the dominantly supported model

#

Ok so let's explore your suggestion more.

#

So, when would I disable auto advancement and how exactly would I set when to enable it, outside of stripe with some kind of cron job type logic?

ebon glade
#

You would disable it immediately after the invoice was created (so you could do it when you get the invoice.created event). When you want to charge for the invoice (with something like a cron job, or whatever else you choose) you would set auto_advance: true , and if you want to charge for it immediately you can just make the request to finalize + charge right then

round basin
#

Ok, so the same thing I'm doing with the pause sub, just subbing that with some outside scheduling mechanism to avoid the inaccurate effect on MRR.

ebon glade
#

yup!

round basin
#

Guess I liked the webhook method because of the retries and error logging that I then don't have to implement. Too bad the pause sub effects MRR. But if I set the pause sub to make invoices setTo draft mode does it really affect any calculations?