Integrating WSO2 API Manager with a 3rd Party Billing tool

How can we integrate 3rd party billing to the WSO2 API Manager?

WSO2 API Manager with the integration of WSO2 Business Activity Monitor (WSO2 BAM) provides out of the box capability to generate API statistics. However some organisation would require the API Manager to be used with their own (3rd party) billing systems. There are few ways that this can be done. These methods are illustrated in the diagram below
3rd party
1. The API Manager already collects all API related data when an API invocation is made by a service consumer. The API Manager can publish them to WSO2 BAM, which the WSO2 BAM uses to generate information required for API statistics. The same process can be utilized by a 3rd party tool to access API information from the API Manager. Once the data is published to the WSO2 BAM, WSO2 BAM would stores the data in a Cassandra data-store and summarize these data periodically based on a set of Apache Hive queries. The summarized information can then be inserted to a RDBMS which can be accessed by the 3rd party billing tool.
2. API Manager can publish to any thrift data endpoint which can be utilized by the 3rd party billing system to recieve data from WSO2 API Manager. This would provide direct integration with the 3rd party billing system.
3. API Manager uses a thrift data publisher to publish data to a billing system, it is possible to write an extension in the WSO2 API Manager to provide the capability to publish data in a different protocol to a 3rd party billing tool. This extends the capability of API Manager to work with any billing system that can recieve data using standard web API’s.
The WSO2 API Manager is shipped with a standard set of Hive queries(As part of the BAM toolbox) to summarize API data. It is possible to modify or write your own Hive queries to summarize the API information based on your own KPI’s to fit the needs of the 3rd party billing system. The billing system can directly access the RDBMS and use it as a data source to generate billing information.

4 thoughts on “Integrating WSO2 API Manager with a 3rd Party Billing tool

  1. Hello,
    I’m wondering what specific information about the requests/responses is available for the billing systems. I suppose URL, username, API name/version. But for example what about the HTTP headers? We think about providing the billing information from the underlying services through HTTP headers. Or is there another more elegant way how to communicate a more fine-grained service usage from the underlying services to the billing system and statistics?


  2. Hi Nadeesha,

    I am using API Manager 1.10.0 and went through this webinar to set up billing:
    Around the 20min mark, Nuwan added the API subscription workflow. Do you know any examples of workflows or guides on this subject, as I didn’t get enough information from the webinar or this blog post to actually set up redirection to a billing system.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s