#muhammadumar_71783_63904
1 messages · Page 1 of 1 (latest)
so does send emails functionality automatically enables if we take our app to the production surface?
Some of the emails are controlled via settings: https://dashboard.stripe.com/settings/billing/automatic
Okay, I will review it later. Currently, I am uncertain about how to implement the subscription renewal functionality. Does Stripe automatically send an email to the customer when their subscription is about to expire? If so, I would like to gather some additional details from the user during the subscription renewal process to save on our end. So Could you please guide me in this regard like how we can handle this situation to collect data we need?
The Subscription doesn't expire by default, i.e. it automatically renews. What info do you want to collect?
Have you looked through our Subscription integration guide? It will give you all the necessary info: https://stripe.com/docs/billing/subscriptions/build-subscriptions
We are currently integrating the subscription API for the car insurance system. In the Stripe dashboard, we have three different products: Uber Eats, Uber X, and Taxi. When a user subscribes to a car insurance plan among the ones mentioned, we save certain data like the order_id and other necessary information to the subscription metadata. Through this approach, we can identify that the user has paid for insurance for their car model, and it is currently covered by insurance through our insurance company.
Furthermore, we will send emails to users for actions such as cancellation or subscription, which serves as proof that the user's car is either insured by our company or that the insurance has been canceled. This leads to a question: if Stripe automatically charges the customer, how will we know if the user has obtained insurance for the current month or not? I believe this clarifies your doubts.
Now, could you please guide me on how to achieve the desired functionality?
You can retrieve the Subscription by ID directly, or by Customer ID: https://stripe.com/docs/api/subscriptions/list#list_subscriptions-customer
And check if the status is "active".
Alternatively, you can listen to customer.subscription.updated or invoice.paid, invoice.payment_failed webhook events.
Okay, I will test it. If I require any additional assistance with this matter, I will certainly reach out to you again. Thank you.
Happy to help!