PHPackages                             ssplugin/ss-membership - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. ssplugin/ss-membership

ActiveCraft-plugin[Authentication &amp; Authorization](/categories/authentication)

ssplugin/ss-membership
======================

Craft CMS membership with stripe.

4.0.1(3y ago)0661[1 issues](https://github.com/ssplugin/ss-membership/issues)MITPHPPHP ^8.0

Since Jan 3Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ssplugin/ss-membership)[ Packagist](https://packagist.org/packages/ssplugin/ss-membership)[ RSS](/packages/ssplugin-ss-membership/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (4)Versions (10)Used By (0)

SsMembership plugin for Craft CMS 4.x
=====================================

[](#ssmembership-plugin-for-craft-cms-4x)

A membership site lets you limit access to your site’s content to only paid users.

SS Craft Membership plugin will easily integrate with Stripe so you can accept membership payments and protect your content from non subscribed users. It will help you to setup membership integration of your site.

To read plugin documentation [ SsMembership Documentation](http://datadazzle.com/ssplugin/)Requirements
------------

[](#requirements)

This plugin requires Craft CMS 4 or later and PHP 8.

Installation
------------

[](#installation)

To install the plugin, follow these instructions.

- In the Control Panel, go to Settings → Plugins and click the “Install” button for SsMembership.

SsMembership Overview
---------------------

[](#ssmembership-overview)

It is work with a Craft cms User groups and permissions. You must be create a relevant groups and assign the permissions to each group. i.e. if your website need to setup **Super** and **Premium** membership, you need to create User Groups like Super and Premium. Now, create a membership plan and assign user group with it.

Configuring SsMembership
------------------------

[](#configuring-ssmembership)

Once you’ve installed the SS Craft Membership plugin. Configure Stripe gateway public and secret keys and save the configuration.

#### Membership Plan

[](#membership-plan)

Membership Plan allow manage user groups for when a user subscribes to a plan. On your Craft CMS Dashboard go to `Settings -> Membership Plan`

Plugin will automatically create a subscription plan on Stripe Dashboard.

Test mode plans no longer availanle in live mode so that test and live mode membership plans are different.

Using SsMembership
------------------

[](#using-ssmembership)

Check permission on twig template, you can use Craft cms core functions to check specific group permission. Here are few examples.

```

{% if currentUser.isInGroup('groupHandle') %}
     You are allowed to access this content.
{% endif %}

```

`.can()` method is helpful when you need to check specific permission or craft cms section permission.

```
{# example 1 #}
{% if currentUser.can('permissionName') %}
     You are allowed to access this content.
{% endif %}

{# example 2 #}
{% if currentUser.can("createEntries:#{section.uid}") %}
     You are allowed to Create a new section.
{% endif %}

```

Twig Templating
---------------

[](#twig-templating)

#### Subscribing with User Registration

[](#subscribing-with-user-registration)

While user registration, add stripe card payment and membership plan dropdown field. User will automatically subscribed selected plan after successfully register. User Registration Form with membership field:

###### Stripe Payment Field:

[](#stripe-payment-field)

```
{{ craft.ssMembership.paymentField }}

```

###### Membership Plan Field:

[](#membership-plan-field)

```
{{ craft.ssMembership.planField }}

```

#### Subscribe with logged in User:

[](#subscribe-with-logged-in-user)

We have understood how subcription work with registration But what if user already registered? User can subscribe membership plan after logged in.

Note, if logged in User have already subscribed any of the subcription plan then not able to subscribe other membership plan.

```
{# Make sure user is logged in #}
{% requireLogin %}
{% set plans = craft.ssMembership.getplan() %}

    {{ csrfInput() }}
    {{ hiddenInput( 'action', 'ss-membership/subscription/switch' ) }}
    {{ hiddenInput( 'firstName', craft.app.user.identity.firstName ) }}
    {{ hiddenInput( 'lastName', craft.app.user.identity.lastName ) }}
    {{ hiddenInput( 'username', craft.app.user.identity.username ) }}
    {{ hiddenInput( 'email', craft.app.user.identity.email ) }}

         Select Plan
        {% for plan in plans %}
             {{ plan.name }}
        {% endfor %}

    {# stripe card payment #}
    {{ craft.ssMembership.paymentField() }}

     Subscribe

```

#### Cancel subscription:

[](#cancel-subscription)

Cancel user's subscription immediately. The customer will not be charged again for the subscription.

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

For cancel current subscription of logged in User {% requireLogin %}

Canceled subscription can`t be reactivate again.

```
{# Make sure user is logged in #}
{% requireLogin %}
{% set subscription = craft.ssMembershipSubscription.getSubscription() %}
{% if subscription is not empty %}

        {{ csrfInput() }}
        {{ hiddenInput( 'action', 'ss-membership/subscription/cancel' ) }}
        {{ hiddenInput( 'subUid', subscription.uid|hash ) }}

             Immediately
             Cancel at period end

         Cancel

{% endif %}

```

Brought to you by [ssplugin](http://www.systemseeders.com/)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~33 days

Recently: every ~0 days

Total

9

Last Release

1328d ago

Major Versions

1.0.2 → 4.0.02022-09-28

1.0.4 → 3.x-dev2022-09-28

3.x-dev → 4.0.12022-09-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/dba0b3a57fe8ae927cc12a47695eb344fa8ba6c62ceb0ba8b5eb12bdc2542373?d=identicon)[ssplugins](/maintainers/ssplugins)

---

Top Contributors

[![ssplugin](https://avatars.githubusercontent.com/u/47738902?v=4)](https://github.com/ssplugin "ssplugin (29 commits)")

---

Tags

craft-plugincraftcmscmsCraftcraftcmscraft-pluginssmembership

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/ssplugin-ss-membership/health.svg)

```
[![Health](https://phpackages.com/badges/ssplugin-ss-membership/health.svg)](https://phpackages.com/packages/ssplugin-ss-membership)
```

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

101372.9k40](/packages/verbb-formie)[verbb/knock-knock

Password protect your public facing Craft website with a single password.

17122.8k7](/packages/verbb-knock-knock)[matt-west/craft-recaptcha

Integrate Google’s reCAPTCHA into your forms.

1959.9k1](/packages/matt-west-craft-recaptcha)[jamesedmonston/graphql-authentication

GraphQL authentication for your headless Craft CMS applications.

2917.0k](/packages/jamesedmonston-graphql-authentication)[thejoshsmith/craft-fab-permissions

Give yourself better control over your sections with Craft Field and Tab (FAB) Permissions. Restrict which tabs and fields are visible to different user groups.

1611.5k](/packages/thejoshsmith-craft-fab-permissions)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
