#connie-subscription-invoice

1 messages · Page 1 of 1 (latest)

hasty nexusBOT
stark snow
#
  1. Yes invoices are created right around (with some potential lag) the subscription's current period end time.
  2. You can extend the 1 hour period by setting auto_advance: false on the Invoice after it's been created. This will keep the invoice as a draft until you choose to manually finalize it.
#

Before I answer #3 - how do you plan on updating these invoices with the currect usage? Are these usage-based subscriptions?

#

Do you add additional invoice items to the pending/draft invoice?

vital pagoda
#
  1. Thanks!

  2. I will keep this in mind in case we decide to update the invoices on creation instead

  3. Customers will be billed for the actual plan they're on (flat, recurring price), and throughout their current billing cycle, purchase additional usage like users (all of our usage is on a tiered, graduated pricing model). When customers purchase additional usage, they're billed a prorated amount immediately. If a customer decides to remove a user at some point before their current billing cycle ends, then we calculate this at the end of the cycle to ensure we have the latest values to update their subscription.

I was thinking I could setup our clock to kick off a job to fetch the subscriptions that will be billed on that day, calculate their usage, and then update them before invoices are created. And yes, it could be a mix of adding new items (like any fees) and updating quantities of existing line items. Please let me know if there's any other context I can provide!

stark snow
#

Yeah, if you need that final quantity to be reflected in the Invoice correctly you'd have to update the Subscription before the Invoice is created

#

The extra fees and stuff would be fine during the draft period, but the auto-generated items that are created by us wouldn't be editable

vital pagoda
#

Ah that's helpful, thanks! Let me think on this a little bit more, then.

I was thinking if we did want to handle the invoice.created event type, we could update the invoices to auto_advance: false, and then trigger a job that handles calculating usage, updating the subscription/invoice with the correct line items and finalizing it. But if we can't adjust the invoice line items generated by the subscription, then I'll have to rethink this a bit

stark snow
#

Yeah, you would be able to add additional line items, but you wouldn't be able to modify the ones already created by us

hasty nexusBOT