#tyler_best-practices
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/1355228497701900298
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, taking a look here
Thanks!
Hi, you can make the call to update the current subscription: https://docs.stripe.com/api/subscriptions/update after the trial is over
Here is a bit more on how to achieve this: https://docs.stripe.com/billing/subscriptions/upgrade-downgrade
When the trial is up, will an invoice automatically be generated then?
You can listen to this event, https://docs.stripe.com/api/events/types#event_types-customer.subscription.trial_will_end and update the subscription then
And will I need to generate the invoice then? Or can I have Stripe do that for me?
Stripe will do that for you. I recommend that you test this fully. You can use Test Clocks, https://docs.stripe.com/billing/testing/test-clocks to advance time
This allows you to test subscription behavaiors without having to wait
Oh, awesome!
Sure
For our annual plan, we prorate to the last 28th day of the year, so it would be just shy of 12 month usually. We need to be able to let the user know what their prorated price will be. Is this possible to be able to know what the upcoming invoice that would be generated would be? Would that be the event you mentioned earlier for this as well?
Yes, you can listen to that event and then use the upcoming invoice for instance, https://docs.stripe.com/api/invoices/upcoming to see what it would look like
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Do you know when that is created? Is it right after the subscription is create? Any way to know what it would be before the subscription is created?
I am thinking during the checkout we want to let them know what the prorated price would be. I can calculate it, but obviously if I could get that from Stripe it would be better.
It almost looks like you might want to look at https://docs.stripe.com/customer-management
You create the subscription with the trial. Then, during the trial your customer can use the Customer Portal to manage their subscriptions.
You can control what they can/ can't change there
I think I looked at that, but it seemed like the URL for the customer portal needed to be generated and was only good for 24 hours or something?
Is there a way to get a static URL for them to use?
I just don't want to have to make an API call every time they access the console to render the URL
Oh, I guess I can just make it a route and handle the redirect after I get the URL from Stripe
Ok, this gives me a lot to go off of. Thanks so much
Sure
Random question - do you know who built or provides this Discord integration you use? Or was it made in-house?
Our teammate built it using Discord' API.
Thanks - it's great.