#camsteffen_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1386780431818428458
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
To clarify, I'm hoping to use an already existing subscription schedule instead of re-entring the schedule details with the invoice preview request since that seems fragile.
I also tried using preview_mode=recurring and IIUC that does not take into account upcoming phases.
Hello
What happens when you et the schedule ID when creating a preview invoice?
https://docs.stripe.com/api/invoices/create_preview#create_create_preview-schedule
That does seem to work for the next upcoming phase. Actually I want to look to the next phase after that.
Our use case is "subscription extensions". We extend your subscription by 1 month means we add a month-long phase at the end of the current phase, and then start another phase after the "extension phase". That last phase is where I want to generate an invoice.
I don't think there's a way to go to the next to next phase unfortunately.
You can override the schedule with the next to next phase details instead using schedule_details - https://docs.stripe.com/api/invoices/create_preview#create_create_preview-schedule_details
or directly listing the changes under the subscription details - https://docs.stripe.com/api/invoices/create_preview#create_create_preview-subscription_details
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
hmm okay. Do you think there might have been a better way to support the use case?
perhaps by setting trial_end?
Yeah that might work? I'd suggest giving it a try in test mode
okay, I think that'll do for now. thanks!