Creating an API Project
Refer the Manage API Projects section to create an API Project.
Click the icon beside the respective project to open it.
Creating a Monetization Limit Check policy
Click the Policy Configurations icon on the left margin in the API Projects screen and perform the following actions:
Create a Monetization Limit Check policy.
- Click the environment in which configuration needs to be set, select the Enabled option and click the save icon to save the policy.
Adding the policy to the Project Level Policies repository
- Click the Project Level Policies icon and go to the Proxy Response tab.
- Click the Add button and select the Monetization policy from the dialog box
- Click OK to add the Monetization policy.
- Click the Save icon to apply the changes.
Creating a product and adding to the Monetization Project
Go to the Applications page and perform the following in the Products section.
- Select the server group and add a new API Product
- Provide the values as per requirement and click the Edit icon in the Projects in product section to add the project added in Step 1.
- In the Add/remove projects section, select the new project created and click the OK icon.
- Click the Save icon to save the product configuration.
- Select the server group and add a new API Product
Configuring Monetization
Click the Monetization tab under the Product Configuration section.
Adding a Transaction Recording Policy
- Expand the Transaction Recording Policy section and click the Add button.
- Add the parameters to be checked to the context variables and click OK.
- In the Transaction Success Criteria section, click the Add button and add an attribute named "Status" to configure success criteria. Select Checking Criteria as "EQUALS" or "MATCHING" depending on the requirement.
In the "CUSTOM ATTRIBUTES" panel, add the attributes that need to be monitored for invoice generation.
- Click the Save icon to save the configuration
Adding Product rate plans
Expand the Rate Plan section, click the Add icon and add a Rate Plan ID. Click OK.
Standard Rate Plan
In the Standard rate plan, only the provider and the user are involved and hence the developer does not get revenue.
- Under the Rate plan Configuration section, provide a unique name and click the Rate plan scope drop-down and select "Standard".
- In the Plan Details tab, select the below options
- Revenue Model: Ratecard.
Rating Parameter: Chose from the options "Volume" and "Custom Variable".
- Metering Type: Choose from the options UNIT, STAIR STEP, and VOLUME, specify the "Duration", "Renewal Term" and the "Payment Due" details.
- Freemium Package: Specify if it is applicable; else select "No".
- Under the Rate Plan Rates section, click the Add icon to add the Rate for transactions depending on the "Metering Type".
- In the Fees tab, enter all other fees details.
- Click the Save icon to save the product.
Developer Rate Plan
In the Standard rate plan, the developer, provider and user are involved and thereby the developer gets a share from the provider for the APIs developed .
Under the Rate plan Configuration section, provide a unique name and click the Rate plan scope drop-down and select "Developer".
In the Plan Details tab, chose the Rating Parameter from the options "Volume" and "Custom Variable".
Ratecard Revenue Model
In the Plan Details tab, select the below options for the Ratecard revenue model:
- Metering Type: Choose from the options UNIT, STAIR STEP, and VOLUME, specify the "Duration", "Renewal Term" and the "Payment Due" details.
- Freemium Package: Specify if it is applicable; else select "No".
- Under the Rate Plan Rates section, click the Add icon to add the Rate for transactions depending on the "Metering Type".
- Metering Type: Choose from the options UNIT, STAIR STEP, and VOLUME, specify the "Duration", "Renewal Term" and the "Payment Due" details.
Creating Client
- Click the Clients icon on the left pane in the Applications page, click the Add button and provide a valid email ID.
- Specify configuration details and click the Save icon to save the client details.
Creating Client Subscription with the Monetization product
Click the Client Subscriptions icon present below the Clients icon and perform the following actions:
- create a new client subscription choosing the client added above.
- Provide the subscription details and click the Edit button in the Subscribed Products property.
- Use the "Subscribed Products" option to select the product and the rate plans associated with the product.
- Click the Save icon to save the Client Subscription
Verifying Monetization Setup
To verify whether monetization is enabled, the rate plan ID is set correctly and the limit was successfully executed, perform the following actions in the Analytics page.
Go to the Advanced tab in the Analytics screen. In the Group by drop-down, select the options below as required:
- MONETIZATION_ENABLED: To verify whether Monetization is enabled or not.
- MONETIZATION_SUCCESS: To verify whether Monetization Limit Check is applied correctly or not.
- API_APPLICATION_RATEPLAN_ID: To verify whether the rate plan ID is set correctly or not.
The green color in the graph represents successful completion of the above tasks and the blue represents failure.