Getting started with API Monetization
1.
Install Server Integration
Install a server integration to meter API traffic or ingest custom actions directly.
View Integrations
2.
Setup Billing Provider
Connect Moesif to your billing provider like Stripe for automatic invoicing.
View Setup
3.
Create a Plan and Price
Create a pricing model such as tiered, PAYG, and more.
View Product Catalog
4.
Create a Billing Meter
Create a billing meters for usage-based billing or create a quota rule.
View Billing Meters
With API monetization, you can directly charge for access to your API. Moesif supports usage-based models like Pay-As-You-Go along with quotas and limits.
The first step is to get your raw consumption events in Moesif which can be your API logs or custom actions.
Log API Calls via Server Integration
The first step is to install a server integration to log API traffic to Moesif. Moesif has integrations with most API gateways and platforms providing a unified view of your API usage regardless of your underlying API management stack. You can mix and match multiple integrations together. Moesif is compatible with OpenTelemetry as well.
Identifying Companies
To ensure API traffic is associated with customer accounts for billing, you must ensure your server integration identifies the company (customer) or link API users to companies. See docs on identifying companies.
Ingest Custom Actions
Instead of a server integration, you can directly send custom events to Moesif’s Track Action API. This can be done such as from an event stream like AWS Firehose and Logstash. See Options to Ingest Custom Actions.
Connect Billing Provider
Once you have your raw events in Moesif, you can connect Moesif to a billing provider like Stripe or Zuora. The integration enables Moesif to automatically invoice customers and collect payments.
Lastly, you’ll want to create your plan, price, and billing meters in Moesif.
- Create plans and prices through Moesif product catalog for your pricing model such as PAYG, tiered, etc.
- Then create a billing meter which represents the billable metric like API Calls or Unique Users to charge for.
Create Plans and Billing Meters
Once you ingest your events into Moesif, you can start creating plans, prices, and billing meters.
- A plan is the item you are selling like “Starter Plan”
- A price is how the usage is rated which can contain tiers.
- A billing meter represents the metric you want to charge on such as “API Calls” or “Gigabytes”
A full diagram on Moesif entities is below.