Is there any FOSS to manage subscriptions? My particular need is to trigger an API call upon subscription to start the service, and then bill subscribers based on their usage. The service would report the usage to the subscription manager.

It would be awesome if the manager also provides a user area for subscribers to manage their subscription, pay bills and change a few settings, create support tickets, etc.