The [register_form_stripe] shortcode allows you to display a Join button that, when clicked, will open a modal with a payment form. When a payment is submitted, the customer will be registered for a membership and have an account created for them with the email address entered in the payment form. The customer will receive a follow-up email inviting them to set their password.

This shortcode depends on the Stripe gateway being configured.

Shortcode Parameters

The shortcode accepts a number of parameters that allow site owners to define the button text, the membership level which to add customers to, the title of the window, the description below the title, and the price shown on the button.

The following parameters are accepted:

  • id - Required. This defines the membership level that customers will be subscribed to when submitting payment.
  • data-name - Optional. Defines the title shown at the top of the modal. Defaults to the name of the membership level.
  • data-description - Optional. This sets the text shown below the modal title. Defaults to the membership level's description defined by the id parameter.
  • data-label - Optional. Controls the text shown on the Join button. Defaults to "Join {level name}".
  • data-panel-label - Optional. Defines the text shown on the submit payment button in the window. Defaults to "Pay {price}" or "Start Trial" if the membership level has a trial enabled.

Payment Flow

When added to a page, with the required id parameter, the Join button will look something like this:

Note that Restrict Content Pro does not style the button - it uses the styles your theme applies to <button> tags. If you want to customize the appearance of this button then you can do so with the CSS class "rcp-stripe-register-submit-button".

When the button is clicked, a payment window like this is displayed:


If your membership level has an ID of 7, the basic shortcode would look like this:

[register_form_stripe id="7"]

The ID of your membership level can be found at Register > Membership Levels. Locate your membership level in the list, hover over it, and you will see "ID: " followed by a numerical value. This number is the ID. This should NOT be confused with the "Access Level", which is a different value.

In the above screenshot, the membership level ID number is 7.

You can customize the trigger button and modal description like this:

[register_form_stripe id="7" data-label="Subscribe Today" data-name="My Great Service"]

With these changes, the modal would now look like this:

How Does It Work With Multiple Memberships?

Because of the simplicity of the [register_form_stripe] shortcode, it does not work optimally with multiple memberships (Restrict > Settings > General). The shortcode does not have enough information to differentiate between a renewal, upgrade/downgrade, or brand new signup. If you have multiple memberships enabled, then [register_form_stripe] will always treat the registration as a brand new membership. It cannot be used for upgrades/downgrades or renewals.

Have more questions? Submit a request