#ibgoldbergs
1 messages · Page 1 of 1 (latest)
Yeah, you can look at current_period_end (see here: https://stripe.com/docs/api/subscriptions/object#subscription_object-current_period_end), which gets returned when you retrieve a Subscription using its ID: https://stripe.com/docs/api/subscriptions/retrieve
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
That gives end date
but what about subscription billing amount (after coupon applied, if applicable)
for next bill
I'm trying to build a system to let support agents know the next amount a subscription will bill for, and what that date is. Would like to surface it in our UI
You would want to look at the Upcoming Invoice API in that case: https://stripe.com/docs/api/invoices/upcoming
There is a webhook event that is triggered ahead of the renewal date as well: https://stripe.com/docs/api/events/types#event_types-invoice.upcoming
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
the unit_amount on the price object seems to only give the price before coupon is applied
So invoices upcoming... when does this next upcoming invoice get created?
I think I understand it now, just curious to know when this upcoming invoice is created. Is it always the next invoice?
So the Upcoming Invoice API just gives you a preview of an Invoice, which will look like the actual Invoice once it's created. You can look at period_start on the upcoming Invoice to find out when it will be created: https://stripe.com/docs/api/invoices/object#invoice_object-period_start
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Cool. And since we use charge automatically, we can use this as the renewal date