Hello everyone and welcome back to the Cognixia podcast. Every week, we get together to talk about the latest happenings, bust some myths, discuss new concepts, and a lot more from the world of digital emerging technologies. From cloud computing to DevOps, containers to ChatGPT, and Project management to IT service management, we cover a little bit of everything week after week, to inspire our listeners to learn something new, sharpen their skills, and move ahead in their careers.
Ever wondered how you could monetize that API you always wanted to develop or have already developed? You had that perfect vision of selling this API that you know has a huge demand but just can’t figure out how to put it on the market. Then today’s episode is especially for you. Today, we talk about how to monetize an API on AWS by combining Amazon’s API gateway.
To get started, you need an API that can be monetized, obviously. The API has to have potential. It must be useful. It should solve a problem, you know, the basic market dynamics things. Technically, an API can be monetized, but if you’re really planning to make an income out of it, then it has to be useful, isn’t it?
What are the three key issues you will face when monetizing your API?
First, managing the subscription of the API. This includes creating an account, pausing the services on an account, cancellation of the subscription, etc.
Second, managing the money. Handling sales on a global scale, across the multitude of payment methods that are used across different countries is a lot more complex than you can imagine or expect.
And third, controlling the access to the API. This would include providing the key to the subscriber that remains valid for the duration they have subscribed to, renewing the key if the subscription is extended, throttling, etc.
Now, there are different ways you can go about the monetization process. The first and most straightforward option is to use an API marketplace. Since we are talking specifically about AWS in this episode, the AWS Marketplace does support API Gateway APIs. You can list your API on the AWS Marketplace and voila, you are in business!
The limitation of this approach is that your audience would usually be limited to existing and future AWS users only. That is a large number by itself, no doubt. But, say you have an API that you feel would have a much larger impact irrespective of which cloud platform the user uses, then maybe the AWS Marketplace isn’t the best fit for you. Say you have an API that helps with SEO and would be a huge blessing for people who are building websites on WordPress or are using a no-code approach to building things. Then AWS Marketplace will not get you as many customers.
The answer to this is widening your horizon and looking for generic API marketplaces that are not tied to any specific cloud platform or any platform, like say Rapid API. Ideally, this should be a good solution, but in reality, it may not always be so. This particular example – Rapid API has its limitations. Rapid API focuses on users who want to integrate APIs into their applications and if you go back to the SEO-assisting API we spoke about, then again, this would not be a good fit. So, check for the fine print when picking a marketplace. There could be some conditions applied on the listing or the platform may be specifically targeting a section of users that may or may not be a good fit for your API. Just choose wisely so you won’t regret it later. Do your homework well.
Another thing to check is how the API marketplace handles payment collection and taxes. Is it wired to handle payments and taxes globally? What payment gateways and services are they using? How will you get paid? What are the deductions? Can it handle multiple currencies? Is it capable of collecting all the necessary information to meet compliances across different countries? Look for answers to these questions before deciding.
If API marketplaces are not a good idea, then what should you do? List it on Amazon? Well, you can get everything on Amazon, but maybe not APIs. Also, your audience wouldn’t look for APIs on Amazon with Prime delivery, would they?
A great option might be to check out generic payment and subscription platforms, for instance, Stripe. The payment and taxation-related questions apply here too, and we do recommend getting to the bottom of all those questions. Money matters are no joke, right?
Going by reviews and what we have heard from experts, FastSpring is a good platform to check out, but you can look for alternatives and go with whichever platform works best for you. It should have a good UI, be easy to use, and have minimal downtimes, you know the drill.
The platform would provide a storefront that potential customers visit to subscribe to your API. The platform then creates a subscription key and provides it to the customer, enabling them to use the API. On the other end, the subscription platform will also send a webhook event to the API gateway which would include details like the subscription ID and the license key it has created.
With us so far?
Now, the API gateway invokes a Lambda function. The Lambda function, in turn, creates an API key using the license key that the subscription platform had generated and shared. This API key is then assigned to the usage plan selected by the customer.
Next, from the customer’s end, a request goes to the API Gateway, which would include the license key in the header. The API gateway will then validate the API key and the usage plan, and then forwards it further.
Makes sense? Rest assured, the whole process happens way quicker than the time it took for us to describe it all to you.
During the selection and monetization process, one more important thing to be aware of is the payload size and the request timeout duration. You will need to devise your usage plans based on these two metrics. This is essential to protect your infrastructure from accidental or malicious requests flooding cyberattacks. You can define quotas of permitted requests per day, per week, and per month and also define the target request rate per customer.
When using AWS for your APIs, remember that AWS does not guarantee the application of throttling and quotas with 100% accuracy. According to the AWS documentation, “Usage plan throttling and quotas are not hard limits and are applied on a best-effort basis. In some cases, clients can exceed the quotas that you set. Don’t rely on usage plan quotas or throttling to control costs or block access to an API.” Moreover, the new Amazon API gateway HTTP APIs still do not support usage plans and you might need to use the legacy option, so check before proceeding.
Once all the checks are done, the API gateway would have to be configured to validate the API key and the usage plan. And, with that, your monetization kicks in. While AWS Marketplace is a great choice when marketing APIs that would be best suited for AWS customers. However, when monetizing APIs that are suited for or limited to customers without AWS accounts, build a combination of API gateway, usage plans, API keys, Lambda, and a payment & subscription platform, that might turn out better.
Easy, isn’t it?
With that, we come to the end of this week’s episode of the Cognixia podcast. We will be back again next week with another interesting and exciting new episode. Hope you found today’s podcast episode useful. Do consider leaving us a review, it would be immensely helpful for us.
See you again next week, until then, happy learning!