Hey James,
Thanks for writing in to clarify this, and sorry that our docs don't
do a better job here.
The short answer is that the subscription lines in the invoice sound
like the right thing to look at for your need (advancing eligibility).
The long answer is that this is due to the way that we think about
accruing billables.
Essentially the invoice period is the "period over which billables
accrued" for the invoice, and the subscription period is the "time
period that the customer is paying for." Hence the off-by-one factor
between the invoice period and the subscription period: you accrue
billables in period X, and at the end of period X, you pay for the
subscription period X+1.
For a concrete example, suppose a monthly subscription is created on May 1st.
The initial invoice will have period_start == period_end == now-ish,
as you've observed. Basically this is a fresh subscription and there
is no previous time over which billables accrued, so to speak. And
the subscription period paid for will be May 1st - June 1st.
When June 1st rolls around, the invoice that is created will have
period May 1st - June 1st, as it will include any invoice items that
were accrued over the month of May. Additionally, it will include the
subscription charge for June 1st - July 1st.
So if you're looking at an invoice and asking "when this invoice gets
paid, until what point will this customer's subscription be fully paid
off?" the answer is the period end on the subscription line item.
Cheers,
Jim
P.S. I don't believe that any of this has changed with API versions,
though I'd be happy to double-check if you can recall which version
you were previously on.
> --
> You received this message because you are subscribed to the Google Groups
> "Stripe API Discussion" group.
> To post to this group, send email to
api-d...@lists.stripe.com.
> Visit this group at
>
http://groups.google.com/a/lists.stripe.com/group/api-discuss/.
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
api-discuss...@lists.stripe.com.