#oleg-codaio

1 messages · Page 1 of 1 (latest)

ruby hornetBOT
thick whale
#

When you say "pending line items" are you talking about the line items for the next full billing cycle?

winged marlin
thick whale
#

Or are you talking about other pending invoice items on the customer?

winged marlin
#

So we're using subscription items with quantities and basically the customer got a bunch of credit from decreasing quantity from 10 to 1

#

Then they decided to upgrade to a more expensive plan, thinking that the credit they got from the downgrade would apply to their invoice, But instead it didn't, and those invoice items remain pending there

#

They're pending line items from subscription prorations in this case

thick whale
#

Gotcha - let me take a closer look at that customer

#

Turns out this is expected behavior for proration_behavior: always_invoice (we don't pull in those pending invoice items unless you also reset the billing_cycle_anchor with always_invoice)

winged marlin
#

Got it, any workarounds you'd recommend apart from resetting the billing cycle?

#

I guess I could figure out how to manually edit the invoice while it's in a draft state, remove pending line items and add them to the invoice

#

Or after making the proration could I just manually do invoice create to create an invoice?

thick whale
#

Yeah either of those options will work

#

but the second one will probably be less API calls (since you just have to do the update call and then the invoice creation call)

winged marlin
#

makes sense... will experiment with that

#

wish the docs were a bit more clear on how always_invoice would work though

#

(or if there was a always_invoice_include_pending option) - since the current behavior is a bit unintuitive