#sf_webhooks

1 messages · Page 1 of 1 (latest)

thin arrowBOT
#

👋 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.

gray badge
#

Hi there, right now the only recurrence is one_time, so yes you are right, you can only create once-off alerts.

pastel relic
#

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?

gray badge
#

Is it about prebilling ? i.e., Collecting a few months invoices upfront?

#

And does " auto replenishes a subscription term" mean cancelling a subscription?

pastel relic
#

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

gray badge
#

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?

pastel relic
#

yup

gray badge
#

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.

pastel relic
#

sounds great, but how would know when they exhusted their tokens?

gray badge
#

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

pastel relic
#

will the billing alert fire for the next time they exhust 10k tokens?

gray badge
#

You need to create another alert for the same customer since the alert is only fired one time.

pastel relic
#

does the alert need to be 10k or 20k tokens?

gray badge
#

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.

pastel relic
#

so what is the burndown billing giving me better then a subscription (it seems like my bottleneck is the alerting)

gray badge
#

You can use subscription with burndown model, they are not mutually exclusive.

pastel relic
#

gotcha so my alert would be when user hits 0?

gray badge
#

Actually it should be when the user has used all tokens (i,e, 1k).

pastel relic
#

got it, now when i recreate the alert do i set the amount to 10k or 20k (10k original + 10k new)

gray badge
#

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?

thin arrowBOT
#

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.