In the product, has metrics for information that is pulled from an API.
The metrics are updated by CRON in WHMCS
At the end of the month the metrics are billed for
ie:
Let's say we have a server product and it's called 'My Product'. We charge a flat fee of $100 per month for MyProduct. However, we also collect two metrics at the end of the month from an API call, those metrics being '# Users' and 'Records'. Now, we want to configure 'MyProduct' so that it has Usage Stats and billing prices for # Users ($50 per user), and Records ($0.10 per record). So at the end of the month (or via CRON) it pings the API and has the data of 15 users, and 5000 records.
Then, WHMCS will generate the invoice for the monthly fee of $100 + 15 Users @ $50 per user + 5000 records @ 0.10 per record.
Is usage billing something that isn't supposed to be used by us? Is it there only for WHMCS created modules? There are also no demonstrations, or examples or anything online to assist developers in getting this damn thing to work.
Question
MKAS
Hi all,
We are trying to build a server module that:
ie:
Let's say we have a server product and it's called 'My Product'. We charge a flat fee of $100 per month for MyProduct. However, we also collect two metrics at the end of the month from an API call, those metrics being '# Users' and 'Records'. Now, we want to configure 'MyProduct' so that it has Usage Stats and billing prices for # Users ($50 per user), and Records ($0.10 per record). So at the end of the month (or via CRON) it pings the API and has the data of 15 users, and 5000 records.
Then, WHMCS will generate the invoice for the monthly fee of $100 + 15 Users @ $50 per user + 5000 records @ 0.10 per record.
We have got the 'server' side covered -created the server, have the api calling etc, but for the life of us we have no idea how to get the metered billing area to populate... We have gone through all the documentation at https://docs.whmcs.com/Usage_Billing, https://developers.whmcs.com/provisioning-modules/usage-metrics/, https://developers.whmcs.com/provisioning-modules/usage-update/, and everything included in and linked below this page https://classdocs.whmcs.com/8.7/WHMCS/UsageBilling_ns.html and yet still can't figure it out.
Is usage billing something that isn't supposed to be used by us? Is it there only for WHMCS created modules? There are also no demonstrations, or examples or anything online to assist developers in getting this damn thing to work.
Any assistance is appreciated!
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.