#rbole
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
What do you mean by "same TS"?
Could you please share the Invoice ID?
Still looking, please give me a moment.
Looks like this was the initial Invoice on a Subscription? If so, this is expected
Our invoice period start/end are always for the previous period (opposite for subscriptions). As this is the initial invoice, it's expected that the dates be the same – the creation timestamp
ah this period means invoice period not subscription period ?
how can I get the current subscription period from this payment ?
because the invoice.paid is first on hook and later the subscription.update event happens. So I have to know during the invoice.paid event what is the next subscription period_end timestamp.
You'd 'expand' the subscription field on the Invoice object: https://stripe.com/docs/api/invoices/object#invoice_object-subscription
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok, how can I do this for the hook event? or I have to retrieve the invoice again ?
You'll need to retrieve the Invoice (or Subscription) directly from the API in your webhook