#vitorleitao_docs
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/1347222929397649570
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello there
You want to look at: https://docs.stripe.com/billing/subscriptions/webhooks
For:
If possible, I would also like to know if there is an option to set reminders X days before a subscription is due to be paid and sending emails to the users.
You want to useinvoice.upcomingwhich you can specify when that fires in the Billing Settings in your Dashboard
Perfect, I will have a look at those docs
Thanks for the assistance
Sure thing
I still need to try this but in the test mode, for subscriptions do we have the ability to trigger the renewal manually?
Just thinking it will be usefull while we build the feature
In terms of testing you mean?
yes exactly
You want to use Test Clocks for that: https://docs.stripe.com/billing/testing/test-clocks !
perfect, I think I have all the docs I need then
Thanks for this
Happy to help
Hey @main hound I just want to confirm one thing from the subscription docs
https://docs.stripe.com/billing/subscriptions/webhooks
https://docs.stripe.com/billing/subscriptions/build-subscriptions
When the user first pays the initial subscription, we will receive the checkout.session.completed webhook, and then depending on the successfull payment of the subscription renewal (either monthly or annually depending on how its configured) we get invoice.paid or invoice.payment_failed
In these invoices, I assume its stripe triggering the payment in the background with the stored payment details, and not actually generating an invoice like we would do with the Invoices API correct?
Is it just reusing the same webhooks?
Or is it generating an invoice tied to a subscription and then trying to pay it out automatically?
Yep it generates a new Invoice and attempts to pay it using the set default_payment_method (either the default on the Customer or the Subscription depending on which is set).
You can listen for invoice.paid or customer.subscription.updated for renewals as both will fire.
Just depends which data you care about really
The best thing to do here is to test this out!
For the first payment, does it also generate an Invoice?
That is perfect. I'll try to test it out and listen to the events it sends and the objects.
Thanks @main hound