#bugkiller.
1 messages · Page 1 of 1 (latest)
Can you share the in_xxx ID
in_1M9Vu0BTGnRwDyDifTeR9HdQ
Can you pleaes check this invoice?
This invoice was paid last year 2022 Dec 3
What part is 'wrong'?
why it's period start, period end is 2021-11-29 15:39:05 2022-11-29 15:39:05
like 2021 to 2022
not 2022 ~ 2023
The invoice dates reflect the prior period, that's just how they work
You can look at the period hash on the item (https://stripe.com/docs/api/invoiceitems/object#invoiceitem_object-period) for the dates that reflect the current period
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
then how can I check if user is in paid period ?
even if subscription is cancelled we need to give right access.
fro example, subscription payment (yearly) on 2022-Nov-29,
even if subscription canceled, still need to give proper access until (2023_nov-29 because it's yearly pay)
As I explained, look at the period has on the related item on the Invoice object
On the Invoice object there's a lines field. Inside of that is a hash for each of the items on the subscription. The period hash inside of there will have the dates that reflect the current period
lines.data will be always sorted?
The API ref mentions this (https://stripe.com/docs/api/invoices/object#invoice_object-lines):
The individual line items that make up the invoice. lines is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.