Introduction to Metered Billing

Metered Billing is a turnkey solution enabling you to monetize your APIs effortlessly. Because it doesn’t require any code changes, you can accelerate your monetization plans.

Overview of Metered Billing

Moesif supports direct integration with your favorite billing providers for metered billing. Simply create a new Metered Billing plan, plug in your billing provider, set up a filter to manage which API calls you want to bill for, and begin monetizing your APIs. You can create billing meters in Moesif in a few clicks that implement your usage-based pricing strategy.

To get to the Metered Billing screen, simply click the Metered Billing navigation item in the left-side navigation.

Navigating to Metered Billing Screen

Billing plans report usage of your defined metric to your billing provider and charges them with the correct quantity for the plan’s billing period.

Creating a new billing plan

Creating a new billing plan can be done in a few different ways. You can do it through the New Billing Meter menu item in the left navigation menu.

Example

It can also be done through the Metered Billing screen by clicking Add Billing Meter on the Billing Meter list screen.

Example

Additionally, by clicking the Create New button in the left navigation menu and selecting Billing Meter under Alerts and Workflows, a new meter can be created.

Example

A new billing plan will require a few details, including:

  • Name
    • This will be the name that your billing meter will display as in Moesif
  • Billing provider info
    • This includes the linked billing provider, plan, and add-on that this meter will report to.
  • Filters
    • This is the criteria for which API transactions or actions should be included in the metric.
  • Metric to charge on
    • This is the metric that you charge customers on. Generally, Event Count is common to choose, but other options exist including Unique Users, Unique Companies. You can also formulate your own metric using custom metadata fields such as to track bandwidth consumed or other metrics.

The fields are shown on the screen like so:

Example

Usage is always grouped by Company Id. The usage totals for each company will be tallied and sent to the billing provider to charge the customer based on plan and add-on billing cycle.

Editing an existing billing plan

Updates to existing billing meters is limited to changing the name and status (enabled or disabled) of the billing meter. Editing an existing plan is limited due limitations that need to be enforced for audit purposes.

Once a plan has been created, it can be edited and updated by going to the Metered Billing list screen and clicking on the plan Name of the plan you want to change.

Example

You can also edit the details for the plan by clicking on the kebab menu at the end of the billing entry and selecting View Details.

Example

Linking a billing meter to a billing provider

If you have not set up a billing provider, you can do so by clicking the Billing Provider dropdown on the Metered Billing details screen, by clicking the Edit Billing Provider button on the Metered Billing list screen, or by going to Settings > Extensions and selecting the billing provider that you want to configure or edit from the extensions list.

When you create a new billing meter, under the Link To section at the top of the Metered Billing input screen, you can select your billing provider, plan, and add-on that the usage data should be counted towards and linked to.

Example

Setting the Usage Multiplier

If required, you can optionally multiply your usage by a ratio before sending the data to your selected billing provider. For instance, you may be charging a set rate per 100 API calls. In your billing provider this may be referred to as a single unit, you can then use Moesif to charge for the correct number of units by using a Usage Multipler of 0.01. This means that for every 100 API calls that occur, the billing provider will be sent data to charge for 1 unit from Moesif.

Setting the multiplier can be done on the Billing Meter input screen when creating a new billing meter. It is located in the same area where billing provider info can be input.

Example

Adding billing criteria

When a billing plan is created, you must establish what criteria you want to bill upon. This is done by setting the Filter and the Metric criteria.

An example would be to bill on all API Calls which return an “HTTP 200 - OK” response. The Filter and Metric criteria would look like so:

Example

Enabling and disabling a billing plan

Enabling and disabling a billing plan can be done in 2 places. It can be done on the Metered Billing list screen by toggling the status.

Example

It can also be done by going to any of your metered billing plans, turning the plan off, and clicking update save that status change.

Example

Archiving a billing plan

To archive a billing plan, simply go to the main billing screen where all of your plans are listed. Click the kebab menu at the end of the entry and select Archive.

Example

Once clicked, you’ll be prompted to confirm that you do want to archive the plan. By clicking Archive Billing Meter, the plan will then be archived.

Example

By clicking Archive Billing Meter, the plan will then be archived.

Example

Plans cannot be deleted due to audit reasons. Once a plan is archived you will be unable to re-enable the plan. If you are looking to simply just make the plan inaccessible for a temporary period, simply disable the plan instead of archiving it.

Cloning a billing plan

To clone a billing plan, simply go to the main billing screen where all of your plans are listed. Click the kebab menu at the end of the entry and select Clone.

Example

Once clicked, the settings from the original billing plan will pre-populate the new billing meter screen (the same screen used to create a new billing plan).

Updated: