#nukesforbreakfast

1 messages · Page 1 of 1 (latest)

tranquil condorBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

novel stream
#

No I don't think there is. You can test in Test mode using Test clock though

rapid vapor
#

OK, so there's nothing that would automatically clean up draft invoices?

#

I'm asking because I'm trying to figure out how to work around what appears to be a limitation with the invoice items API. It doesn't appear that I could update an invoice item created without an invoice to later point to an invoice. The field isn't present in the update invoice item API.

#

my first thought was to just have a draft invoice open for each customer for each billing period, and attach whatever fees/fines that were assessed in that billing period as new invoice items.

#

but if there's no invoice items for that billing period, then the invoice would never get finalized because it would have no items.

novel stream
#

Wait, do these invoices belong to a Subscription?

rapid vapor
#

(before you ask, I can't use usage based billing tools for this, it doesn't have enough flexibility for what we need to track)

#

no, because they are billed based on events external to stripe.

#

B2B2C use case. I'm generating invoices for the 2C on behalf of the 2B.

#

the 2C only gets billed if they rack up fees/fines from the 2B during the billing period.

#

so, as far as I can tell, that fits the one-time invoice method of generating invoices.

novel stream
#

Yeah sure. And then no the Invoice will stay there in draft mode unless you turn its auto-advance on

rapid vapor
#

you mean auto-advance off?

novel stream
#

You can test it through in Test mode, using Test clock

#

Unless you turn it on, so yes, with it's off

rapid vapor
#

ok. So I can advance a test clock far into the future?

novel stream
#

Yes!

rapid vapor
#

ok, let me give that a shot

#

yeah, it doesn't seem to delete

#

innnnnnnnnteresting

#

I guess I would have to manually clean them up after some time, unless there's no limits on the number of invoices a Stripe account can have?

novel stream
#

Don't think there is. Even if there is it would be big enough that you don't need to care about

rapid vapor
#

alright sweet. Thank you!

#

I have a question about products & prices. Should I open a different thread?

novel stream
#

You can just continue here 🙂

rapid vapor
#

okay, so for prices, I get that they can be active and inactive, with the concept of as pricing evolves over time you would deactivate the old price and activate the new one.

#

is there a way in the API to schedule price changes? For example: Product X is getting a price increase effective January 1, 2024. Is there a way I can add the new price and schedule it to go active on January 1, 2024?

#

and similarly schedule the old price to deactivate at the same time.

novel stream
#

We have a beta feature to "migrate" all subscription from Price A to Price B, but it's not schedule so you would need to setup a cron jobs for the change. But you can also implement the same thing by looping through all your Subscriptions and schedule price changes using Subscription Schedule

rapid vapor
#

what if I'm not able to use subscriptions in this case?

#

and I just need to schedule a price increase so that new invoice items created using the lookup_key for the price get the new price?

rapid vapor
#

I'm looking at the API and there's nothing that seems to indicate scheduling a price change is possible. It just lets you deactivate and activate as far as I can tell.

novel stream
#

There is no API like that, sorry. You would need to schedule a cronjob to update all your Invoices to the new Price

rapid vapor
#

damn, alright

#

if I take a draft invoice and modify it to have auto_advance=True, it will then finalize itself in an hour? Is this true even if the invoice has collection_method="send_invoice"?

novel stream
#

I think so, please test it out