#vitorleitao_docs

1 messages ¡ Page 1 of 1 (latest)

mighty sigilBOT
#

👋 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.

main hound
#

Hello there

#

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 use invoice.upcoming which you can specify when that fires in the Billing Settings in your Dashboard

solemn galleon
#

Perfect, I will have a look at those docs

Thanks for the assistance

main hound
#

Sure thing

solemn galleon
#

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

main hound
#

In terms of testing you mean?

solemn galleon
#

yes exactly

main hound
solemn galleon
#

perfect, I think I have all the docs I need then

Thanks for this

main hound
#

Happy to help

solemn galleon
#

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?

main hound
#

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!

solemn galleon
#

For the first payment, does it also generate an Invoice?

main hound
#

It will really give you a better sense of how things work

#

Yes it does

solemn galleon
#

That is perfect. I'll try to test it out and listen to the events it sends and the objects.
Thanks @main hound