#nsad_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/1232140982443708516
đ 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.
- nsad_subscription-update-proration, 3 days ago, 17 messages
- nsad_api, 3 days ago, 54 messages
- nsad_api, 4 days ago, 11 messages
- nsad_api, 6 days ago, 14 messages
Can you share what is the problem you're facing?
Hello my friend, okay
In my case i have 2 plans, free and premium, in free plan can create 5 users for month, and in the premium plan can create 10 users for month
When have upgrade inside subscription, need continue to count or reset?
Example in free plan, user already create 4 users and upgrade to premium plan, need reset count to zero or continue to 4?
Is this metered usage or per-seat prices? Do you have an example price ID (price_xxx) to share?
Yes sure!
Ok, so basically i am using webhook to sync product, price, subscription in stripe with my database
In case that have a bad requests in my webhook, i need sync what webhook fails in stripe and can recovery data?
Why would there be bad requests?
like this:
events = stripe.Event.list(limit=100)
bad_request_events = [event for event in events.data if event['status'] == 'failed']
for event in bad_request_events:
print("ID of event:", event.id)
print("Tipo do evento:", event.type)
print("Status do evento:", event.status)
print("Data do evento:", event.created)
print("Detalhes do erro:", event.request.status)
Sometimes happen a internal error in my code, or just my webhook dont be acessible
If your webhook server doesn't respond 200, Stripe will retry sending the event again: https://docs.stripe.com/webhooks#retries
uhum... ok
The code above also isn't correct. The status is the status of the invoice, subscription... etc, not the event delivery failure
What are you trying to achieve here?
i understand about the webhook