#mehdi_schedule-preview
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/1283909174987587665
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- mehdi_api, 2 hours ago, 14 messages
Hello! You can only create a preview for the next Invoice, not future Invoices beyond that.
hmmm is there any way to see what would be charged for the later invoice?
or any way to try out subscription schedules in the dashboard to see what it would be like?
Can you tell me more about exactly what you're trying to do? I want to make sure I fully understand so I can provide you the best guidance.
oh yeah sure
we are creating a subscription where the user is charged $10 for the first year and $5 for each year after that
we want to make a checkout screen where we show the initial charge of $10, and also show the "future" invoice
we want to use real data from the stripe api (i.e. using createPreview), that way all the tax information, discounts, etc will be factored in
You could pass in new phases into the preview endpoint to represent what the phases would look like later: https://docs.stripe.com/api/invoices/create_preview#create_create_preview-schedule_details-phases
Would that work?
oh that's what i'm using
but the endpoint only gives me the first invoice
and i want the future ones as well
You can only get the next one, but you can modify the parameters to simiulate the next phase. It'll still be a preview of the next Invoice, but with the modifications to the Subscription you provide.
Yes, they're quite similar. The preview API is recommended though, it's newer and a bit more robust.