Details for billing passed from backend service to API manager or BAM

123 views Asked by At

We have some services (to be exposed with WSO2 API Manager). We want to do a billing for the consumers.

Unfortunately our billing rules need some detailed information that are available only inside the implemented service. I can see 2 ways how to handle it:

  • Either pass the details information as kind of metadata back to the API manager and then pass it to the BAM, where the actual billing will be done. I can imagine some HTTP header or JWT to be used for that
  • Generate the billing directly by the service itself to ESB. I personlly don't prefer this, as this enforces the service implementation to be bounded with WSO2-specific code.

My question is if there is a way how to provide some additional service meta-data in the response (header in transport layer) to the API manager and if it can pass through API manager to BAM to be monitored, billed analyzes etc...

1

There are 1 answers

0
Nadeesha On BEST ANSWER

The following blog describes on how this can be done, I wrote it in a hurry. Have a look and see whether it would fit your requirement. I have also attached the required jar files in the blog.

https://nadeesha678.wordpress.com/2015/12/14/how-to-publish-custom-set-of-data-from-api-manager-to-wso2-business-activity-monitor/