1

I'm looking for advice. We've had a client float an idea with us for a possible extension to their existing Craft website. They want to provide a library of pre-recorded fitness video classes for their customers - This would be a subscription AND 'on demand' service. I guess like Mijingo but for fitness? Here's some questions I have:

  1. Is this possible with CraftCMS or would it need Commerce?
  2. We're thinking the Stripe payment plugin - any advice/alternatives?
  3. Can we stream off S3 or is it better to use Vimeo CDN, is there a plugin to assist?
  4. How to ensure videos are only available to logged in users?
  5. What happens when somebody unsubscribes - how do we automatically remove/pause their access?

If anyone has experience in something like this and can offer any pointers, pitfalls to avoid etc, i'd be so grateful.

Many thanks!

4

Just recently worked a similar project so I'll share what we've uncovered.

Your needs are basically 2-fold: take payment and provide a platform where people can log into and consume content.

Is this possible with CraftCMS or would it need Commerce?

Craft has you covered on content, however taking payment is where having Commerce built-in can be beneficial.

If you're able to build the billing component yourself, you don't need Commerce, however having it built-in, can save a lot of development time and having it integrated in the same system makes sense, especially if someone might have access to tiers of content (this class goes here, this one is not included, etc.) Using Craft's user groups can be pretty beneficial here.

We're thinking the Stripe payment plugin - any advice/alternatives?

Does your client already have other systems where their customers already "subscribe" (eg MindBody, ZenPlanner, Pike13, etc)?

If that's the case, you could interface the two. Upon login (or periodically via cron) ping the 3rd party billing system and see if there's an active subscription. If there is, let them continue; if not, throw up an error message. If you're going to offer subscriptions, Stripe is currently the only first-party gateway to do so. Payment Gateways are definitely a weak spot for Commerce at the moment.

A lot of offline business will have their own merchant accounts so using a gateway like Authorize.Net is pretty common, however the 3rd party plugin doesn't support subscriptions yet.

As an aside, payment processors hate risk. And the risk becomes higher with digital products, subscriptions, etc. Payment gateways like Stripe are notorious for withholding funds especially if your client scales too quickly, too fast.

When it comes to recurring billing and high ticket amounts, these are payment processor red flags. Having a solid payment processor history is helpful when it comes to disputes and chargebacks. It's a huge bummer to have a client have a super successful launch and then they get an email from their processor saying their account is on hold or that they're withholding funds for 2 weeks. Having a "backup" option of taking payment even if it's manual can be helpful.

Can we stream off S3 or is it better to use Vimeo CDN, is there a plugin to assist?

Unless you like giving more money to Bezos than necessary, bandwidth on S3 is expensive. And it doesn't really handle video all that well IMO. If someone is on a smartphone with a mediocre internet connection, you don't want to send them down 4K video when medium quality SD or HD would suffice.

Vimeo and Wistia are better options in this respect. These services can tailor the streaming experience and you can easily lock down content. Wistia excels when it comes to more analytics (who watched what, how long and more). Their API is pretty easy to work with as well.

How to ensure videos are only available to logged in users?

Both Wistia and Vimeo have options to embed only on domains but unlike YouTube and Vimeo, Wistia doesn't let Google index its content by default so it makes it a slightly better choice.

Unlike YouTube where there's not really a good way to prevent users from going back to watch the video on the site (where users can then go and bookmark it), you can customize the player and branding so it's really "embedded" on the site.

What happens when somebody unsubscribes - how do we automatically remove/pause their access?

On every page load of a restricted page, typically you want to {% requireLogin %} and then check to see if the user has an active subscription.

The Commerce docs and included templates are good examples of a starting place.

Depending on how you setup your site and what the user has access to, you can relate the Commerce subscription with the class/video module in question to make sure the user is only allowed to see what they currently have purchased or have access to.

2
  • 1
    Wow, thank you for your very comprehensive response RitterKnight. Lots to think about there. They do use MindBody so it's probably worth exploring how we could interface with that to keep things 'tidy' on the business admin side. I suspect this is a much bigger project than they anticipate. Thanks again!
    – Martin
    May 18 '20 at 7:48
  • 1
    I run a Craft application that does a very similar thing, though for a different market, and RitterKnight's answer is spot on. We use Vimeo Pro for video, all of our content is served from Craft and I've just built a Commerce integration to handle subscriptions using Stripe. The latter is quite involved - go in with open eyes, Commerce needs some reasonably strong dev/problem-solving skills if you're not doing things in a 'standard' way. May 18 '20 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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