#sergx_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/1222112492117819472
đ 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.
- sergx_docs, 3 days ago, 21 messages
Which part of what you describe are you struggling with? What is not working as you expect?
So I would like to know how to implement this logic on my SaaS:
Imagine the user update their subscription, and stop paying for the add-on.
How can I determine he is not paying for the add-on?
Well generally when you make a change to a subscription to add/remove items there is a new invoice generated to reflect that change. So you'd listen for related events (invoice.created, customer.subscription.updated) which would reflect the change
I understand. So the logic would be, if the subscription is active and exists a subscription with the price_id (of the add-on), user can have access.
If not, he cannot access to the feature, right?
exists a subscription_item*
Sounds logical yes. You can infer their 'access' from the items on the subscription and the status
Perfect got it! Another doubt I have, is the interval of items have to be the same?
It doesn't make sense a user pays monthly for the plan basic, and yearly for the add-on right?
Yes, a single subscription can only have items with the same interval