Hi Josh,
Ah, good question. Since the launch of multiple subscriptions per
customer, it has been possible to specify, when creating an invoice
item, that that invoice item should "bill on" a particular
subscription. [1]
Concretely, suppose that a customer has 2 active subscriptions:
1) sub_a, bills on the 15th of the month
2) sub_b, bills on the 30th of the month
When an invoice item is created without a specified subscription id,
it will be picked up the next time any active subscription is
invoiced. So, if you created an invoice item on the 13th, it'd bill
with sub_a on the 15th. If you created an invoice item on the 20th,
it'd bill with sub_b on the 30th.
Supposing it's the 13th of the month and you want to create a billable
that you know will bill on the 30th with sub_b, you can do so by
specifying subscription=sub_b at invoice-item-creation-time.
Additionally, since the launch of multiple subscriptions, proration
invoice items always know about which subscription they bill on. This
is the mechanism by which, supposing that I upgrade sub_b from the
"silver" plan to the "gold" plan on the 5th of the month, we know not
to invoice those prorations until sub_b bills again on the 30th of the
month.
So, in summary:
* proration invoice items created since 2013-11-14 should always have
non-nil subscription
* most other invoice items will likely have nil subscription, unless
subscription was explicitly set by a multi-subs user
Jim
https://support.stripe.com/questions/whats-new-with-multiple-subscriptions-per-customer-january-2014