#avalari_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/1412796666460901377
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Ho, that is the correct event, https://docs.stripe.com/api/events/types#event_types-customer.subscription.updated to listen to when looking to see upgrade/ downgrades:
Occurs whenever a subscription changes (e.g., switching from one plan to another, or changing the status from trial to active).
You can look at the previous_attributes to see what changed
Due to the msg limit I omitted one more thing.
How does the flow work when a user downgrades from a higher tier plan?
Scenario A: Stripe immediately triggers an event telling me to downgrade the subscription, and I must persist the higher-tier resources until the current billing period ends.
Scenario B: Stripe only triggers an event at the end of the current billing period, and that’s when I should adjust the resources.
Which scenario is correct, and what event(s) should I monitor?
You can review how downgrading and upgrading prices work here: https://docs.stripe.com/billing/subscriptions/change-price
It might depend on what other parameters you're passing but you can use our Test Clocks to advance time and test this on your end: https://docs.stripe.com/billing/testing/test-clocks