API Monetization with API Gateway and API Portal
Tags: api, monetization, guide, integration
Published: 2021-06-21 14:38:50

---
title: API Monetization with API Gateway and API Portal
published: true
date: 2021-06-04 07:41:27 UTC
tags: #api, #monetization, #guide, #integration
canonical_url: https://tech.forums.softwareag.com/t/api-monetization-with-api-gateway-and-api-portal/241908
---

## Introduction

API Monetization is the ability to produce revenues from the consumption of APIs. Knowing how to make money with APIs can help in realizing the business goals.

**Participants in the API value chain**

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/3/c/3c8eb7ba2ca1d98532f76718f2065ddcb7eaedb6.png)

API Monetization can help to create new revenue opportunities for the organization, provides insight about customer behavior, building customer loyalty and to stay relevant and maintain a competitive edge in the marketplace.

**API monetization models**

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/6/d/6ddc4171e04abe6c2b51279b16560b51fd23f39f.png)

webMethods API Gateway offers API Monetization through creation of _API Packages and API Plans._

**An API Package** refers to a logical grouping of multiple APIs from a single API provider. A package can contain one or more APIs and an API can belong to more than one package.

**An API Plan** is the contract proposal presented to consumers who are about to subscribe to APIs. Plans are offered as tiered offerings with varying availability guarantees, SLAs or cost structures associated with them.

An API package can be associated with multiple plans at a time. This helps the API providers in providing tiered access to their APIs to allow different service levels and pricing plans.

API Providers can create the API Packages and Plan in the API Gateway. Whereas API Consumers can subscribe to the API Package from the API portal and start consuming the API.

## Audience

This document is intended to the API providers who wants to implement the monetization for the APIs hosted on the webMethods API Gateway. Document also explains how API consumers can subscribe for the API Packages and consume the APIs from API portal.

## Pre-Requisites

- Configure API at the API Gateway
- Refer the link to create API  
[GitHub - SoftwareAG/webmethods-api-gateway: Repository hosting developer tutorials, code samples, custom policies, CI/CD scripts and more to enable developers develop faster with API Gateway](https://github.com/SoftwareAG/webmethods-api-gateway)
- Basic Knowledge on API portal.

## Use Case

Let’s see, how we can implement API Monetization for the below use case.

_“A leading telecommunications organization, has developed few communications APIs like SMS, WhatsApp etc., which can be consumed by third party developer group for implementing features like sending SMS, sending WhatsApp etc., to the end users”_

**As an API Provider** , below are the steps to create the API Package in webMethods API Gateway.

In the below sample, we will show the creation of API Packages and API Plans for **SMS API** with the ability to send SMS to consumer.

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/c/1/c1c36d62f6f89f607100acfe8bab2a15f45b3be4_2_690x142.png)

**Step 1:** Click on the “Packages” in the title navigation bar and click on “Create”

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/8/e/8e75b9413f1c8a0178135e551187bbc9f16b2137_2_690x91.png)

**Step 2:** Select **Package** from the list of choices and click on **“Create”** option.  
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/c/1/c1f7ef9632cd127adb94d881ed3f352049d912c1.png)

**Step 3:** Provide details of Package Name, version, description. Select the desired icon to represent your package.

In the below screenshot we have created the package with name _“CommunicationsPackage”_

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/4/e/4e9722dbb39aa63042421cc74e24883d7053c86c_2_690x299.png)

Click on **“Continue to add plans”** if there are already existing plans to associate with this package. API Plan can also be created in later stage and then can be associate with the API Package.

In this example we will create the Plan later and then associate it with the _“CommunicationsPackage”_

**Step 4:** Associate SMS API to the _“CommunicationsPackage”_

Type characters in the search box and click the search icon to search for the required APIs. A list of APIs that contain the characters specified in the search box appears.

Select the required APIs to be associated with the Package and click **+** to add them. And click on **“Save”**

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/7/d/7d8e709ac8299799b73d1071deaff1543b400316_2_690x222.png)

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/2/2/221ce77ed8c0dab2af1f9eb5eb5d9ce879d94d92_2_690x187.png)

**Step 5:** Create Plans by going back to “Packages” in the title navigation bar. Click on **“Create”**

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/8/e/8e75b9413f1c8a0178135e551187bbc9f16b2137_2_690x91.png)

**Step 6:** Select **“Plan”** and click on **“Create”**

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/6/5/650b6ab03b8cf90b6b6da2428dc46d191dd72843.png)

**Step 7:** Provide details like Plan Name, Version, Description, suitable Icon for your plan.

In the below screenshot, we will create Plan named _ **“SMS Plan”** _

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/9/f/9f47f78925b9bc8cc580a4d3900bd54eeed4a152_2_690x295.png)

Click on **“Continue to add pricing”** to add the pricing configurations.

Provide the details like Cost for the plan, terms of conditions for the pricing and license details

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/a/8/a896cee5b611b643ecb063c36db243cebb40f73e_2_690x295.png)

Click on **“Quality of Service”** to specify rate limits and quota.

For specifying the rate limits, click on **“Add Rule”**. Rate limit helps to specify the maximum number of requests supported in specified period. This is for applying the throttling rule.

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/c/a/ca6ca4421c0cd04c1ed183f08453a596836e9b00_2_690x204.png)

Specify the Violation message to be displayed to the consumer if the rate limit is exceeded.

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/1/1/112dab52fd12ddaf8810529a0cce2d771d8c7277_2_690x274.png)

For specifying Quota, provide details like maximum number of requests allocated in the plan for a specified period.

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/9/d/9d69117f0424777c41597174f4e8e48659f5978a_2_690x295.png)

“Block on Breach” option can be enabled, which will block access to the API after it exceeds the specified quota.

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/b/0/b0004e63752c99999466bb41fcf02cc597255198_2_690x295.png)

Notification settings can be also be configured, which will help to send the notification proactively once the total request count reaches the % value as provided in the maximum quota value. This will help to minimize the disruption in the service when the API invocations exceeds the allocated quota.

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/0/8/081a718ae91a0250b87f43a285980821266bb764_2_690x324.png)

Once all the configuration is done, click on Save button for saving the plan.

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/e/9/e9de13382b3fd0d242f39e9e32e18ea36f66d1ce_2_690x150.png)

**Step 8:** Associate _“SMS Plan”_ to the _“CommunicationsPackage”_ package.

Navigate to “Package” in the title bar, select the package “CommunicationsPackage” and click on Edit.

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/8/0/80017d2a9689e467df3ca55dad5fa26ea51fda75_2_690x177.png)

Navigate to the “Plans” section in the left-hand side menu and select the required plan “SMS Plan” and click on Save

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/f/0/f0e8ed05a9f9dfa501175d246579c8cf9985ce25_2_690x130.png)

Once the package is associated with the plan, activate the package.

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/d/4/d4031af02d535299f0d383deb69a10369fd86f09_2_690x178.png)

**Step 9:** Package and plan subscriptions can be done only through API Portal. To achieve this, publish Package “CommunicationsPackage” and associated API to API portal.

Click on the Publish icon present next to the “CommunicationsPackage” to publish to API portal.

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/2/e/2e0e7d0fea3b0abc25ba180f9a6c98a54607c948_2_690x190.png)

Select the API Portal Community to which package needs to be published and click on “Publish”

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/8/a/8a61ad9af62eedbfc108f6a06f2b2f8405f621b1.png)

**As an API Consumer,** Below are the steps to consume the SMS API from API Portal

**Step 1:** Subscribe _“CommunicationsPackage”_ package from API Portal

In API Portal, Click “API packages” in the title navigation bar. Here we can find the “CommunicationsPackage” published from the API Gateway.

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/d/6/d63d79afab1b38de2fac05583e8c410fd20794f4_2_690x325.png)

Click on “Show details” to see the plan details associated with the package.

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/e/2/e2432e92cfe20f26d79b59c4bf7e7a1036125958_2_508x499.png)

Click on “Subscribe” to get subscribed for the Package.

A dialogue to request for API access token appears. Provide the application details and click on “Request token”. This will create the application in API portal with the necessary token details to access the SMS API.

In the below example we are creating the application named _“SMSApplication”_

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/1/4/142f1f656b43e8fbeea7d8672c2e4d3140c7b942_2_536x500.png)

Token details can be found by clicking on the “Applications” present under the user option in the right-hand top corner of the screen.

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/9/9/99b138ab526ea9146abb60867b2f75d468647348.png)

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/6/a/6ac9f8ec806916ee6fdb84fd37f1e2d13b3da4e6_2_690x288.png)

Now we can consume the SMS API with this “SMSApplication” created.

Click on API Gallery in the title bar, and select “View Details” under the SMS API

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/2/6/26c96058d793bbc858d0cb2a3b4bbc2610e6cafd_2_690x218.png)

Click on “Try API” present at the bottom of the screen.

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/c/0/c0a2cae17d9dd2e07b0b34a89bf957faf6aee942_2_690x324.png)

The “SMS Application” created while subscribing the “CommunicationsPackage” will be present in the left-hand side and the token details are added automatically in the Headers section.

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/3/1/31313fadfd9dd92b18d560f95543e2b857f13343_2_690x324.png)

Provide the required payload in the **Body** section and click on **Send** to test the SMS API

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/c/b/cbddb11e7785e7e96958357519656b084aee66c6_2_690x324.png)

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/3/4/34fc22fd7ceb50b3ef9f1aaa1ca7de5d7a7e5620_2_690x220.png)

Once the throttling limit is exceeded, below error will be sent from the API Gateway.

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/1/8/188c17e3f8cd1c8f1e16b3680169030ded537f2d_2_690x232.png)

For more details please refer the documentation site [https://documentation.softwareag.com/](https://documentation.softwareag.com/)

[Read full topic](https://tech.forums.softwareag.com/t/api-monetization-with-api-gateway-and-api-portal/241908)