#jgoldencrt_unexpected

1 messages ยท Page 1 of 1 (latest)

elfin iceBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1414996663306682480

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

sick shoal
#

Hi there, can you clarify your question. Are you attempting to search for an Invoice?

plucky flare
#

I have a particular invoice. What I noticed is that for this particular invoice, the period start and end timestamps in the stripe.invoice table (in Snowflake, synced via Fivetran) did not match the timestamps I saw for the product when I searched for the same invoice on Stripe in my browser. Since the invoice is for a subscription, I would think that the invoice period start and end timestamps would correspond to the subscription start and end period as well. But they appear to be different in this and other cases. I just want to know what the best way for me would be to identify to subcription period covered by that invoice using data exported to Snowflake

sick shoal
#

Gotcha, can you provide the Invoice ID?

plucky flare
#

in_1RZo4wJaf89hC41IuMcQk0PC

elfin iceBOT
dense abyss
#

๐Ÿ‘‹ stepping in here

#

The period_start and period_end of an Invoice covers the period the Invoice bills for (see: https://docs.stripe.com/api/invoices/object?api-version=2025-07-30.preview#invoice_object-period_start) -- this is technically the previous period except for the very first Invoice for a Subscription these timestamps will be the same as there is no previous period at that point.

However, the Subscription Item's current_period_start (https://docs.stripe.com/api/subscriptions/object?api-version=2025-07-30.preview#subscription_object-items-data-current_period_end) and current_period_end will be the forwarding look portion

plucky flare
#

Ok. The issue is subscription_item to subscription is a 1-to-1 current snapshot look. I really care about, say, if we get $1200 for a 12-month subscription, we would want to realize $100 of revenue each month of the subscription. So I am trying to associate start and end dates to each payment related to a subscription.

dense abyss
#

Hmm I'm not sure I understand exactly what you mean there. For the above you would just have a monthly interval right?

elfin iceBOT
dense abyss
#

Maybe you can clarify what you mean by:

associate start and end dates to each payment related to a subscription

plucky flare
#

For each invoice, the product we are selling is a subscription for a fixed amount of time. Often this is exactly one month from when the transaction is completed, but not always. For every single transaction of this type for a particular subscription_id, I want to know where I should check in stripe to get the information for when that fixed amount of time starts and ends

dense abyss
#

Okay then you want to look at the lines.data.period.start/end of the Invoice to see the date the forwarding look period the Invoice bills for. So the start there would be when the Invoice billed and end is the end of the period.

plucky flare
#

Ok thanks. I'll look at period_start and period_end for the invoice_line_item for each of these invoices

#

I think that's probably all for this issue, unless I run into problems with that. I don't really have time to QA that approach right now.