How can I add recurring+metered billing support to Marketpress


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.


  • aecnu
    • WP Unicorn

    Greetings Arvind,

    Thank you for the great questions.

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

    I have no idea if you can accomplish this or not. Are you a great coder? I would imagine that if this were the case you would not be asking us, but I thought I would ask anyway.

    I feel that the above is a simple and workable solution to my problem

    I am happy to see that you find this simple and workable.

    Let us know when you have it finished up if you want some Beta testers, we can always dig some up.

    Thanks again for letting us know and for being a WPMU DEV Community Member!

    Cheers, Joe

  • Arvind
    • Site Builder, Child of Zeus

    Hello Joe

    Is it possible to ask one of the marketpress developers to go through my post and answer to the points? I can do programming-- but if a marketpress developer can suggest if what I have written above is implementable/and give advice on changes to my approach- that would be great:slight_smile:


  • Aaron
    • CTO

    Of course you can do anything with custom code. This sounds way outside of the design of marketpress however. It's more of it's own complete custom plugin.

    Have you tried some of our plugins that are desinged to provide similar functionatliy though, like Pro sites or Membership?

  • Arvind
    • Site Builder, Child of Zeus

    Hello Aaron,

    Thanks for the prompt reply-- Pro Sites and Membership dont provide the functionality I am looking for.

    Also, rather than create a completely new module, I wish to create something that is more of an 'addon' to Marketpress- I love marketpress and it has a lot of the functionality I wish to have... But I wish to do that in a way that the core marketpress functionality works as it is- and my 'addon' plugin simply adds the extra features that I want - to Marketpress.

    The reason I asked for your inputs is that you are most knowledgeable about Marketpress's high level design/architecture-- hence if you could kindly let me know if what I have mentioned in my first post is feasible/possible- and also if you could provide advice (if applicable) for eg for a better approach than the one suggested by me-- then I would be extremely grateful.

    Yours sincerely,

  • Arvind
    • Site Builder, Child of Zeus

    Hi Aaron

    Thanks a lot! Just one final query - by any chance can you share high level design/architecture design documents for Marketpress? That would give me a headstart:slight_smile: (Although I understand that may not be possible-- on the off-chance that you can share those documents, I hope you can do so :slight_smile:


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.