Jump to content
  • 2

Usage Metrics / Billing - any examples?


MKAS

Question

Hi all,

We are trying to build a server module that:

  1. In the product, has metrics for information that is pulled from an API. 
  2. The metrics are updated by CRON in WHMCS
  3. 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.

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated