Konubinix' opinionated web of thoughts

API Gateway: How to Monetize the API and Prioritize Paid Plans and Throttle the Free Ones

Fleeting

API gateway: how to monetize the API and prioritize paid plans and throttle the free ones

API throttling,

usage plan,

Throttling by product subscription key (Limit call rate by subscription and Set usage quota by subscription) is a great way to enable monetizing of an API by charging based on usage levels. The finer grained control of being able to throttle by user is complementary and prevents one user’s behavior from degrading the experience of another.

https://learn.microsoft.com/en-us/azure/api-management/api-management-sample-flexible-throttling#product-based-throttling

it’s also important to provide tooling such that customers can stay informed of rate limit issues and a way to audit 4xx errors including 429.

https://www.moesif.com/blog/technical/rate-limiting/Best-Practices-for-API-Rate-Limits-and-Quotas-With-Moesif-to-Avoid-Angry-Customers/

two most common ways to directly monetize your APIs are: Subscription Billing, where you charge your customers a flat monthly fee to access your APIs; and Metered Billing, where you charge your customers based on the number of API calls they make.

https://azure.microsoft.com/fr-fr/blog/how-to-monetize-apis-with-azure-api-management/

Apply API Management policies to control the quality of service for each product. Example projects use two specific policy features to control quality of service, in line with the revenue model:

Policy feature Description
Quota Defines the total number of calls the user can make to the API over a specified time period. For example, “100 calls per month”. Once the user reaches the quota, the calls to the API will fail and the caller will receive a 403 Forbidden response status code.
Rate limit Defines the number of calls over a sliding time window that can be made to the API. For example, “200 calls per minute”. Designed to prevent spikes in API usage beyond the paid quality of service with the chosen product. When the call rate is exceeded, the caller receives a 429 Too Many Requests response status code.

https://learn.microsoft.com/en-us/azure/api-management/monetization-support

Notes pointant ici