#sarge_annual-price-monthly-reminders

1 messages ยท Page 1 of 1 (latest)

sacred mortarBOT
#

๐Ÿ‘‹ 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/1431001409666678784

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

stoic fossil
#

Hello ๐Ÿ‘‹

Stripe will only send webhook events when customers are invoiced and paid. If your customers are paying once a year, we will notify you once a year.

#

Why would you need to be pinged once a month if your customers only pay once a year?

ebon coral
#

idea is to give user credits every month rather than gibing them as a large bulk, there is a chance of doing up selling more credits during the months their usage is too large. This can give balance and they can avoid running out of usage towards the end of the year

#

there is also an idea of making sold credits expiring, so unspent credits disappear, and new month it refreshes

stoic fossil
#

Gotcha, that makes sense. Unfortunately, since the payment is annual, that feature would be outside Stripe.

I would model it as a feature that is enabled/disabled on your integration Customer level. Then you run a cron job every month, like you said, and for every Customer who has paid for their year, you add a fresh batch of credits.

ebon coral
#

Understood, good to know! I was going to go with cronjobs but thought it would just make sense if Stripe has this, incase we migrate and i lose all cron jobs.

stoic fossil
#

You could even use the Stripe API to check if the Customer has the right active subscription.

As for Stripe storing state for you, maybe you could leverage metadata on the Customer object? Have the cron job set the date of the last credit grant? That way you have a record to start from if you need to rebuild your cron jobs.

ebon coral
#

I use Stripe through purchase urls, and don't have a very deep integration yet due to my lack of knowledge yet. I use metadata to recognize item details but never tried to mutate the customer data on our backend. I guess the moment succesful yearly payment happens I can set the cronjob to nth day of the month. Dealing with dates kind of tricky ill try to be careful with this.

But at least now I know cron jobs are the way to go.

#

Thank you so much for help! Kiitos!

stoic fossil
#

Happy to shed what ๐Ÿ’ก I can ๐Ÿ™‚

sacred mortarBOT