What are the options for taking membership subscriptions via Craft? In addition to ‘What is the current landscape regarding e-commerce plugins for Craft?’, I’m looking for current options for setting up membership subscriptions. 

I have a site in development that was using the ‘Commerce’ and ‘Membership’ plugins from Dukt (private beta) but unfortunately they no longer appear to be available. 

The basic requirements would be for a user to signup, pay for membership (ideally through Stripe in this case), which then automatically assigns users to different membership groups depending on their subscription level/status when appropriate (e.g. full, trial, expired, etc).
I don't think that there currently is a plugin option right now, but keep an eye on the craft plugin page. However, given your requirement to "automatically assign users to different membership groups", I think you would need to write your own regardless. That is pretty specific and would require that you have your user groups set up to match the subscription plans.

I recently did something similar for a project. Saving for a few issues with javascript and learning the API for stripe it was fairly straightforward. It is currently a bit hard-wired to the specific project, however — I still need to abstract it so that it's more portable. I would be glad to share some tips, if you are up for writing your own.



The process that I'm using is to store the StripeCustomerId in the custom fieldtype. As far as craft is concerned that's all just 1 field, that is auto-generated and never exposed to the client (i.e. they can't edit the 'stripeCustomerId').

Whenever an 'account' (could also be 'user') is created, I use the onSaveUser event to generate and store a StipeCustomerId. The rest of the field just sends calls to stripe to add card, delete card, create subscription, cancel subscription, etc. via service methods, and then refresh itself with the most up-to-date customer data from Stripe (doesn't ever store this info, just the customerId).

Besides this the only thing that you would need to add is to reassign the userGroup based on the plan selection. However, if you want to ensure that the userGroup is always synced with the Stripe account (i.e. if the client, for example, canceled the subscription directly from their Stripe account), you would probably need to create a webhook to trigger the userGroup re-assignment. Or instruct them to always re-save the user in craft afterwards.