7

I'm building a subscription payments feature right now and I'm trying to determine whether using Magento's Recurring Profiles feature makes sense.

Of course, I would love to use the core feature, I like to be able to leverage core functionality wherever possible, but there are a number of reasons that I don't think it makes sense.

Requirements:

  • We want products to be able to be purchased regularly or on a subscription basis, very similarly to how Amazon subscriptions work.
  • We want to allow all subscription purchases to happen either every month, every 2 months, ... , 6 months. In other words, we don't need granular billing periods define per product or category or anything.

Issues with Magento's Recurring Profiles

  • For starters, they were not released as a stable feature, but rather as a beta.
  • You can't checkout with regular products and subscription products in the same cart. I don't really see any great reasons for this limitation. I actually noticed a nice Magento site recently that does subscriptions without this restriction, and it's pretty neat: http://www.harrys.com/ (UPDATE: I think harrys launched on Magento in March of 2013, but is no longer on Magento).
  • A given product has to either be a subscriptions product (nominal product) or a regular one. So you can't easily have a product page with both a Buy Now and a Subscribe button on it.
  • I don't really understand why they have recurring profiles defined on a per-product level. That's not what I need in my case and I'd imagine it's not a common use case.
  • Shipping methods seem to have some hiccups with nominal products - haven't really dug into it too deep but it just adds to the madness.
  • It didn't seem to be built with the idea that subscription payment services (like Recurly, Chargify, Braintree) would be available to handle the meat of the subscription configuration / processing. Maybe I'm completely wrong on that point b/c it was built against PayPal's recurring feature.

So, the approach that I want to take:

  • Have a custom option that's available for every product for them to determine whether they want to subscribe on a monthly, bi-monthly, etc. basis.
  • In the sales_order_place_after observer, check for any items in the cart with the subscription custom option set, and create subscriptions for them
  • Store the subscription ID in the sales_flat_order_item table.
  • Listen on Braintree webhooks for subscription charges, lookup the order item by subscription ID, generate an order an invoice for the product in question, with the same shipping method and tax amounts.

I'm hoping that there's not something massive that I'm missing here.

2
  • Sounds like you need something custom -- I don't like Magento's implementation of this feature either. Apr 24, 2013 at 14:58
  • I am actually trying to implement the same type of thing you guys have been discussing here. I need to add subscription based billing to bundled products. The options selectable under each product also need to be able to be modified in between billing periods. Have any of you guys come across any code for this since this thread was last updated? It would be really helpful for any starting point or advice you guys could offer before I decided to write this all myself. Thanks in advance!
    – khaos337
    Mar 15, 2014 at 19:26

4 Answers 4

5

Working with recurring profiles in Magento is very rewarding if you spend the time to get the system setup correctly. It's important to understand that recurring profiles are labeled "Beta" for a reason. Certain aspects of administrating them on in the admin is limited. The Sales -> Recurring Profiles grid almost always has to be extended to your local tree to make modifications to show more columns, such as coupon, and stuff you will need for shipping, such as an export button.

The best solution I have found is an extension by Paradox Labs that supports Recurring Profiles with Authorize.NET CIM. It allows the customers to manage their cards, and do all the aspects or canceling, suspend, etc that recurring profiles allow for. It is configurable to run everyday for billing jobs, or like I have it setup to run once a month.

Note you can effectively build a full fledged billing system that includes dunning management, shipping systems, and the works in Magento based on recurring profiles. I have done it. Its a large undertaking and sometimes the easy road is to use another company to manage that aspect.

I've detailed a bit on my learning experience moving from Recurly to Magento recurring profiles here.

3
  • Thanks Tegan! Nice blog post. Wasn't sure whether to respond here or at the blog, but decided to reply at the blog :) Jun 6, 2013 at 23:26
  • Specifically, in the context of this question, what are the benefits of Recurring Profiles that you're suggesting? Recurly support dunning management, right? Shipping systems - what features in particular? I guess having the customer management features already built is a benefit, I built some of those things myself but pretty light layer on top of the braintree API. Jun 6, 2013 at 23:29
  • Can we send payment fail notification to store owner and customer in this Authorize.NET CIM extension? Sep 18, 2016 at 17:47
1

I'll go ahead and answer myself. Was hoping that maybe someone with more experience in this area might chime in, but that hasn't happened yet.

I think the best approach is to not using Recurring Profiles and instead build custom. One downside to using Custom Options is that you won't have a single ID for your "Deliver Every X Months" custom option, so I've had to do some logic on the name of the custom option, which isn't fantastic.

0

I'm trying to solve the same problem, but in my case the whole subscription has to be paid in advance, calculating some discount on the go (given the limited payment options for recurring profiles, expecialy in The Netherlands). And oh yeah, the customer must also be able to change it's subscription after it's been placed.

I haven't found any extension that fills these holes so I'm currently writing code to use custom options to calculate the proper prices. I'm using a bundle product for the subscription where the products in question can be selected with checkboxes. The length and frequency of the subscription are custom options.

To fix the price calculation I wrote a small extension which covers this: http://www.gielberkers.com/how-to-calculate-prices-for-bundled-products-in-magento/

I now can place a subscription as a 'product' in my cart. The next step for me is to let customers change their subscriptions when they are logged in into their 'my account' page.

2
  • Hey Giel, thanks for the info and that's awesome that you built out a price extension for this! In terms of the answer, I was looking for someone to provide an answer as to whether the feature set made more sense to be implemented using recurring profiles or custom and to hopefully provide some rational or past experience along with the answer. But I really appreciate your feedback. May 1, 2013 at 14:23
  • Custom options has been working really nicely for me, the subscriptions products are very lightweight. I also have to build the ability to change subscriptions. Unfortunately in Braintree you have to delete then recreate a new subscription, as you can't modify them, so I have to go that route. May 1, 2013 at 14:24
0

I've studied Magento 1 Recurring profiles for about a month, while I was developing a module that support it.

I found it very interesting, but challenging to understand with no documentation.

All my work was based on debugging and analyzing paypal's built in solution.

In the end, I was able to make it work very well and the results are really good.

I can answer a few of your issues here regarding recurring profiles. Like linking the recurring profile in the order. I was able to do that too in the payment info block.

I understand that you can't have multiple products and/or let your customer to choose if he wants to subscribe in a monthly or annually using the same product, but it wouldn't be that hard to customize it once you have the recurring payment working.

In the end, my solution was to integrate PagSeguro UOL (it's as famous as PayPal, but in Brazil) and my module. I made a video showing how it works and how it's displayed in the backend after the order is placed (it's in Portuguese, but you can see it working).

Bug and workaround

I also found a bug when purchasing with a new customer. When recurring profile processes the payment it triggers a foreign key exception on a customer_id column for a customer that doesn't exist (yet).

You can workaround the problem by dropping the foreign key, but I solved the problem by creating the customer via observer.

Is it worth?

It's worth, I believe.

It's an out of the box feature, it links the orders to the recurring profiles, make it easy(ier) to manage the subscriptions inside Magento, allows the customers to pause/unpause/cancel/update their subscription, create the orders automatically when the order is paid (depending on your module), etc.

Despite all the effort to understand it with no documentation, other modules should give it a try instead of re-building it in a different way. It would take more time.

Not the answer you're looking for? Browse other questions tagged or ask your own question.