Haufe-Lexware / wicked.haufe.io

An API Management system based on Mashape Kong
http://wicked.haufe.io
Other
123 stars 37 forks source link

API Billing #17

Open TESAARON opened 7 years ago

TESAARON commented 7 years ago

Hi Martin,

We have successfully deployed our management portal to a live environment (using correct domain names in the Azure VM where we have deployed the gateway and portal). We also have working API analysis using the Kong http plugin (sending log data to a backend database) and elasticsearch/logstash/kibana to detect and visualize any logging events that occur on an API call. Also, since our logging data is stored in a database, we can implement an alert mechanism for API call errors etc using a cron schedule to listen for error events and push out alert emails/texts.

The final piece to the puzzle is API billing using the rate-limiting plans in kong that you have integrated in the portal. Have you thought of how billing against these plans could be implemented? Is there a further billing application that would need to be integrated within the portal where customers need to input credit card details to buy a specific plan?

Any thoughts you have on this would be greatly appreciated.

Regards, Aaron

DonMartin76 commented 7 years ago

Hi Aaron,

Glad wicked has worked out for your needs. Currently, we have no plans on integrating a billing component, but saying that, we explicitly do not rule it out. The obvious part where this could be done is when subscribing to an API.

Measuring usage is also not simple. It may be "simple" for machine to machine communication, but things start to get more difficult when you also have end users in the play, where Kong limits the rate on a per-user basis, and not per application (this is a limitation of Kong currently). This means you will need to do external analytics much like you do with your ELK stack.

To start a discussion though, what would you want to do? What's your vision on this?

/Martin

PS. If you feel inclined to share your configuration of your ELK stack, I would be more than happy to incorporate that into the documentation.

TESAARON commented 7 years ago

We may need to think a bit more on this but I reckon we would want to charge based on plan chosen when you subscribe to a certain API. i.e. gold, silver, bronze plan. Therefore billing is not done by user or application rather by the API and the specific plan for each API.

I suppose the vision would be that once you click on your selected plan, this brings you to a 'payments' page where you need to enter credit card detail etc in order to subscribe to the API and receive your token key.

DonMartin76 commented 7 years ago

FWIW, stripe.com looks very promising. That could be something that could be hooked up fairly easily to wicked.