A Docker Compose based WSO2 API Manager Monetization Demo
The purpose of the demo to demonstrate WSO2 API Manager Monetization capability by generating an invoice for a sample API.
Boot up the docker compose setup by issuing following command and wait until every server is up and running(you can watch the logs through docker-compose logs -f
and ensure the successful server start up).
docker-compose up -d
Add following to /etc/hosts.
127.0.0.1 billing-engine
Access the publisher at https://localhost:9443/publisher and login using default credential(admin:admin). Then deploy the sample API.
Login into Billing engine using the defualt credentials(admin:admin) and define a plan for the sample API. After creating the billing plan, makesure to logout of the application.
Login into Store using defualt credential(admin:admin) and subscribe to the sample API. During the subscription process it will direct to the billing engine. Sign up as a new user in the billing engine, login using the new user credential and subscribe to the billing plan.
Login into Store using defualt credential(admin:admin) and generate token for the application used to subscribe in previous step. Invoke the API with the token multiple time(Do it in a loop).
Login into Billing engine using the defualt credentials(admin:admin) and generate invoice by clicking invoice button. Select the current month and admin user as subscriber and it will generate invoice for the admin user for current month.