#sf_webhooks
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/1457959008873873472
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there, right now the only recurrence is one_time, so yes you are right, you can only create once-off alerts.
ty
is there anything else I can do to setup a flow where user prepays for usage and auto replenishes a subscription term or when they max out their usage?
Is it about prebilling ? i.e., Collecting a few months invoices upfront?
And does " auto replenishes a subscription term" mean cancelling a subscription?
sorry I didn't explain myself well enough. A user subscribes to a monthly allowance of 1000 tokens, now when either the month finishes or they have used the 1000 tokens we want to renew/restart the subscription
Ok so for example your customer subscibed on the 2nd day of the month. Let's say they finish the 1k tokens on 10th of the same month, you want to renew the subscription and change the billing_cycle_anchor to 10th of the month?
yup
Ok, you can follow this doc to implement the credit burndown billing model. The basic idea here is to charge your customer an one-time invoice, and grant them billing credits.
sounds great, but how would know when they exhusted their tokens?
Once they consumed all credits (i.e., the billing alert webhook is fired). You can then create another invoice and send to them for another 10k token
will the billing alert fire for the next time they exhust 10k tokens?
You need to create another alert for the same customer since the alert is only fired one time.
does the alert need to be 10k or 20k tokens?
You can also set up a subscription, when your customer pays the invoice successfully (i.e., invoice.paid is fired), automatically set up the billing alert and grant them the billing credits.
so what is the burndown billing giving me better then a subscription (it seems like my bottleneck is the alerting)
You can use subscription with burndown model, they are not mutually exclusive.
gotcha so my alert would be when user hits 0?
Actually it should be when the user has used all tokens (i,e, 1k).
got it, now when i recreate the alert do i set the amount to 10k or 20k (10k original + 10k new)
Hmm, I don't have an answer for this. Can I suggest you to write in to us so that I can continue helping you through emails?
Hello @pastel relic, we have sent you a direct message, please check it at https://discord.com/channels/@me/1457967370114039840
- 🔗The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.