How can I add recurring+metered billing support to Marketpress

Hi

I wish to add recurring(subscription) and metered(usage based billing) to Marketpress.

Specifically, can I simply write a marketpress plugin that does the following–

(1) Generates a new invoice at the time the next periodic payment has to be made.

(2) Periodically (eg every few hours) updates usage of the product so far(the product is a usage-based product)– it can even provide a API that an external program can use to update the usage values and costs as well.

(3) At the time of sign up, if the product is a recurring product, then this plugin ensures that the recurring payments functionality of the payment gateway (like Paypal) is used.

(4) Another problem- some countries (like India) have banking laws that forbid recurring payments to be automatically deducted- for such payments the user has to manually approve each recurring payment… This scenario can be taken care of by my plugin to simply generate the invoice and send it to the customer. (Then he can make the payment).

(5) My plugin will also provide the service being sold with API functions–> to suspend or terminate that service (if a user has not made payment)– or the plugin itself can invoke URLs provided by the service itself (calling on that URL with appropriate parameters will result in that service being suspended or terminated).

I feel that the above is a simple and workable solution to my problem (of handling recurring billing/metered billing). Please let me know if the above is doable.

Also, if you have a better solution, or if you can advise me on improvements/alterations to the above, that would be welcome as well.

Thanks,

Arvind.