#xavi3rk_best-practices

1 messages ยท Page 1 of 1 (latest)

sleek lavaBOT
#

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

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

polar pine
#

๐Ÿ‘‹ Happy to help

#

What is the exactt issue you are facing then ?

broken perch
#

Hi! I'm having doubts about how to set this up.

polar pine
#

Could you please clarify more ?

#

Did you start something ?

broken perch
#

First I've made a product for charging the credits to the customer. But i don't understand how this gets added as credit to the customer.

sleek lavaBOT
broken perch
#

Then I've made a meter to track the message consumption. Here the issue is that messages have different costs depending on the country is sent.

#

I need to make a meter for each message price?

#

The other doubt I have is that if I don't want the user to send messages if they run out of credits, I should check the credit balance before accepting the message? Is this a good practice?

sick field
broken perch
#

Hi Dougal, thanks for your help. I've read this, but my only question is: I should add a product for the user to purchase the credit, then listen for the purchase event, and then, through the API, add the credits to the customer account?

#

And regarding the different prices for each message I should have a different meter for each country?

sick field
#

Yes, that sounds correct. It might be simpler to just have one meter though, instead of different ones for each country, and maybe maintain your own mapping of how many credits for each country message, and deduct them accordingly

broken perch
#

Ok, so you say to have a meter that has a $0.001 cost and depending on the message cost send for example 10 usages to deduct $0.01 from the credit

sick field
#

Yes, exactly

broken perch
#

Ok, thanks! Any other consideration I should have regarding billing-credits ?

sick field
#

I don't think so, but if anything else comes up specific to your integration, don't hesitate to reach out