You can set up WSO2 Business Activity Monitor (BAM) to collect and summarize runtime statistics from the WSO2 API Manager and generate bills for API consumers on usage. See a sample with full configuration steps in Generating Billing Data.
Overview
Content Tools
Activity