How to set up recurring billing subscriptions in BuddyPress

Setting up recurring billing in BuddyPress takes some advanced knowledge, but if you’re a web developer it will be easier than you might expect. And incredibly powerful. The following is a detailed guide on how to set up paid subscriptions with multiple levels of access on a BuddyPress-powered website. The four things you will need are:

  1. A dedicated IP address for your website
  2. An SSL certificate
  3. PayPal Pro
  4. s2Member Pro
    1. Installing s2Member
    2. Getting started with s2Member
    3. Integrating s2Member with PayPal Pro
    4. Setting up PayPal Pro forms
    5. Setting up membership levels

Alternatively you can have us set all of this up for you. Fill out our contact form to get a quote for our assistance. We’ve done this many times before.


Step 1: Get a dedicated IP address for your website

In order to install an SSL certificate (covered in Step 2) your website will need to have its own dedicated IP address.

If you are on a shared hosting plan you are almost definitely on a shared IP address as well. We recommend using the HostGator Business level hosting, which will give you both a dedicated IP address and a free SSL certificate and will speed up this whole process dramatically. If you already have a web host, contact them and inquire about how to get your site set up on a dedicated IP address.


Step 2: Get an SSL certificate

In order to handle payments on-site (as opposed to sending your users over to PayPal) you need to have an SSL certificate.

SSL stands for Secure Sockets Layer, a fancy acronym for how to transmit private documents via the Internet. The purpose of SSL is to ensure that data sent between your browser and the payment processor (PayPal in this case) cannot be deciphered by a third party. Without SSL this info is sent as plain text, with SSL it’s encrypted. Basically, SSL prevents credit card numbers and other private data from being stolen.

So where do you get an SSL certificate?

If you have the Business level web hosting plan with HostGator, your hosting comes with a dedicated SSL certificate. You can call their customer support and they will install it on your domain for you. If you have a lower plan with them, we’d recommend upgrading to the Business plan so you can just be done with it. Here is the form to sign up for your SSL certificate.

If you’re on another host, you should call them and inquire if your plan comes with a dedicated SSL certificate. You don’t want a shared one. If it doesn’t, or if it’s very expensive, we recommend buying one from GoDaddy. They sell SSL certificates for $25/yr which is about as cheap as you’ll find anywhere. You can then download the certificate, and email it to your host and request that they install it for you.


Step 3: Set up PayPal Pro

You will be using s2Member to handle subscriptions and to restrict content based on membership level (covered in Step 4). s2Member requires a PayPal Pro account to handle payment processing.

Your users will not be sent to PayPal’s website and do not need to have a PayPal account. They will pay using a form right on your site with their credit card and will have no idea that PayPal is handling the payment. There are other payment processors out there, but I highly recommend using PayPal so you can benefit from the amazing features and very simple setup included with s2Member.

PayPal’s free Business account will not allow you to have recurring subscriptions or on-page payment forms. To get these necessary features you will need to apply for a Pro account (often referred to as “Website Payments Pro”). PayPal will not approve of your application until they see that you have a website set up that (a) describes your business and (b) lists prices for your products/services. This is not that hard. Just set up your homepage on your BuddyPress site to clearly describe your services and list the monthly/yearly fees you’ll be charging paid members. This does not need to be a perfectly crafted sales page — it just needs to pass PayPal’s standards. When you have your page written submit the link to PayPal. In my experience you can get an account approved within a week. If they are being slow, call them and you can get them to move the process along quickly.

Got your PayPal Pro account approved? Excellent. Lets move on to the final step.


Step 4: Set up s2Member Pro

s2Member is wonderful. It’s one of my favorite WordPress/BuddyPress plugins (along with Gravity Forms). s2Member allows you to:

  • Charge users a recurring billing subscription for membership access
  • Charge users for single-purchase access (Buy It Now)
  • Seamlessly integrate with PayPal for on-site billing
  • Restrict access to specific pages and posts, post categories, and URI fragments (such as /groups/)
  • Have up to 5 custom membership levels of varying access, including a basic free level
  • Redirect logged in users to a specific URL on your site
  • And much more…

How much does it cost?

The price for the s2Member Pro plugin is $69 for a single domain license and $129 for an unlimited domain license. If you are a web developer I’d recommend buying the unlimited domain license. I’ve used my unlimited license on many BuddyPress-powered websites for my clients.

a. Installing s2Member

s2Member can be installed like any other WordPress plugin. Just go to the s2Member website, pay for your pro account, and download the files. You will be downloading 2 plugin files; s2Member and s2Member Pro. The basic s2Member plugin gives you all of the capabilities for setting up membership levels and restricting access. The additional s2Member Pro plugin adds support for on-page payments and recurring subscriptions. You will need to upload both plugins to your /plugins/ directory via FTP and then activate s2Member in your WordPress admin.

In addition to the plugins, you will also need to upload a license key. Just tell the people at s2Member what your domain is and they’ll email you a file called s2member-pro-key.php. Upload this file with the other plugins to your /plugins/ directory. Edit: New versions of the s2Member Pro plugin do not require a license key.

b. Getting started with s2Member

Once installed, you will see a new s2Member section in the side menu of your WordPress admin. Click on the Quick-Start Guide and you will see an extremely useful guide for using the plugin.

Once you’ve read the guide, head over to the General Options panel. To make this clear, going forward items with an asterisk will refer to sections in s2Member panels.

* General Options > Security Encryption Key

Pop open the first section titled Security Encryption Key. Have it generate a key for you and make sure to save this key somewhere safe. As it mentions, you configure the key once for each installation of s2Member and you never change it. Scroll to the bottom of the page to click the Save Changes button.

* General Options > Deactivation Safeguards

Skip the other options for now and head to Deactivation Safeguards at the bottom. ClickYes. This is very important. If you skip this step all of your s2Member configurations will be lost every time you deactivate the plugin.

* General Options > Email Configuration

This is the email address that will be used for notifications sent out during the signup process. I’d suggest setting up an email such as support@yourdomain.com for this.

* General Options > Login / Registration Design

This allows you to change the design of your login page located at the usual /wp-login.php. I recommend using your logo so users aren’t confronted with the default s2Member logo.

* General Options > Custom Registration Fields

If you are using BuddyPress ignore this. Your users will enter the profile fields you have set up within BuddyPress.

* General Options > Membership Option Page

This is the page you will use to market your product and include links to your payment forms. Create the page in the Pages section of your WordPress admin, and then come back here and select the page you just created from the dropdown.

* General Options > Open Registration  / Free Subscribers

In many cases you will want to maintain a free level of access. If so, select Yes from the dropdown.

* General Options > Membership Levels/Labels

Level #0 is the free level, and the remaining four levels will be for paid subscriptions. You do not need to use all of them. Create a naming scheme for your levels and enter the names in here. Some examples are:

  • Bronze, Silver, Gold, Platinum
  • Level 1, Level 2, Level 3, Level 4
  • Basic, Plus, Premium, Max

c. Integrating s2Member with PayPal Pro

* PayPal Options > PayPal Account Details

You need to enter your PayPal Pro email address, API username, API password, and API signature. Use the email address associated with your PayPal account and get the rest on their website. PayPal is a confusing site and it took me a while to find all of this information the first time. Login to your PayPal account, and go to: Profile > Request API Credentials. You will see two boxes with different options. Click the 2nd link in the Option 1 box.

Now you will be presented with two more boxes. Click the link in the Option 2 box to get your API certificate. You should now have all of the details you need.

* PayPal Options > PayPal IPN Integration

To enable Instant Payment Notifications (IPN) go to your PayPal account, and head to My Account > Profile > Instant Payment Notification preferences. Click the button called Choose IPN Settings.

Enter the IPN URL provided for you in the PayPal IPN Integration section of s2Member. Then in PayPal, select Receive IPN messages (Enabled). Click Save.

* PayPal Options > PayPal PDT Integration

Go to your PayPal account. Head to Account > Profile > Website Payments Preferences (under the section Hosted payment settings). Turn Auto Return on. Turn Payment Data Transfer on. Click save. Refresh the page. You should now see a unique Identity Token.

Copy this token and paste it into s2Member in the field for PayPal PDT Identity Token. Save your changes.

d. Setting up PayPal Pro forms

* PayPal Pro Forms > Quick-Start Guide For PayPal Pro Integration

This guide is very helpful and I suggest reading it.

* PayPal Pro Forms > PayPal Pro / Free Registration Forms

This section should give you a shortcode to use to generate your free signup form (if you previously selected Yes for Free Subscribers). The code should look something like:

Now go into your WordPress Pages menu and create a new page to advertise your free signups. Add this code into the editor. I would suggest linking to this page from the Membership Options page you set up earlier.

* PayPal Pro Forms > PayPal Pro Forms For Level #1 Access (and 2, 3, 4)

Set up your payment terms for the level you have open. Then click Generate Form Code. You should now have a WordPress Shortcode which you can add to any page on your website. Go into your WordPress Pages menu and create a new page for each of the levels you are using. Add the generated shortcode into the editor for each page. I would suggest linking to these pages from the Membership Options page you set up earlier.

The final form should look something like this.

To be absolutely sure the forms are all SSL enabled, go into the page editor for each page containing a form and add the custom field s2member_force_ssl = yes.

e. Setting up membership levels

Now that we have our membership levels set up with working payment forms, it’s time to set up access restrictions for each of the levels. s2Members has tons of options for restricting content. I’ll cover a few of them so you get the idea. Go back to General Options in s2Member.

* General Options > Page Access Restrictions

From here you can restrict specific pages to members of each level. If a logged out user tries to access one of the pages you restricted, he or she will be redirected to the Membership Options page you set up earlier.

You will need to enter the Page IDs, separated by commas, for each page you wish to restrict. To get a page’s ID you can find that page in the editor, click Edit, then view the ID you see up in your URL bar in your browser for the particular page. But there’s a better way… Just install and activate the WP Show IDs plugin. Now you will be able to see all of your page/post IDs from the Page and Post menus.

You can navigate to the Post, Tag, and Category Access Restrictions and follow the same process. To see the IDs for categories, just click the Categories menu under Posts. It should display the ID for each category.

* General Options > URI Access Restrictions

This is a neat and extremely useful feature. You can enter any URI fragment and any URLs that include that fragment will be restricted to the level you specify. For example, if you enter /groups/ all URLs with the word “groups” in them will be restricted. Only users logged in at that membership level will be able to view groups pages. If you only want to restrict creating groups, then you should enter /groups/create/ as the URI fragment.

Want us to do it all for you?

We’ve gone through this whole process many times. Fill out our contact form to get a quote for our assistance. We’ll be happy to help.

22 thoughts on “How to set up recurring billing subscriptions in BuddyPress

  1. Pingback: Hypnotherapy & NLP Certification Courses! | Default PayDay Loans

  2. Pingback: Niche Auto Profits – *New from Matt Kennedy | atlanta accident attorney

  3. Pingback: Join the Next Generation of Health Care Marketplace | hard drive recovery

  4. Lavinia Ogrady

    This a truly great post and may be one that is followed up to see what goes on

    A friend e-mailed this link the other day and I’m excitedly awaiting your next blog post. Continue on the world-class work.

  5. Pingback: Offshore Oil Rig Jobs — Now Up To $40/sale. | hard drive recovery

  6. Pingback: Forex trading signals providers and Analitics – long version | Uncategorized | Information about Web Hosting, Web hosting service!

  7. Pingback: Great PHP Autoresponder Script, High Demand | auto accident lawyers

  8. Pingback: Get $10,000 in Ads Free! ::: Plus make $31.85 on the Front end!! |

  9. Pingback: Forex Profit Hunter-Best forex robot expert advisor : Team Sport Guide

  10. Pingback: SurveyVanguard.com Paid Surveys $$$ Easy Recurring Billing | DLP TV Stands

  11. Jeena Patel

    So I read through this.
    I still don’t get one thing.
    Once a user registers through the S2 member registration page- does that mean they automatically created a buddypress profile also?

    Or is there a way for me to restrict access to even creating a profile.
    e in buddypress, but they can just perhaps view and create a business directory . (this site has buddypress and business directory) The client want s a membership that allows a business membership only to post and view the directory but not see the buddypress member list- it’s a dating/business website.

  12. Phrantick

    Great tutorial. Sincere thanks.
    But I’m confused (not uncommon for me). Under the head

    General Options > Custom Registration Fields

    you say

    If you are using BuddyPress ignore this. Your users will enter the profile fields you have set up within BuddyPress.

    But s2Member settings for Custom Registration Fields indicates

    With BuddyPress installed, Custom Registration Fields are NOT applicable … UNLESS you’re using the s2Member Pro Module. With the s2Member Pro Module, Custom Fields will be included in all PayPal® Pro Forms, including even Free Registration Forms generated by the s2Member Pro Module.

    And indeed the s2member fields and buddypress fields don’t seem to tie up.

    So, how do I mesh the BuddyPress profile with the s2Member profile?

    Thanking you in advance for ANY help you can give (I’m getting desperate).

  13. Ray Gulick

    Very nice tutorial. How and where do you specify which pages on your site have the SSL certificate applied? In cPanel? In your PayPal account?

  14. Ray Gulick

    Was doing fine until item d: Setting up Paypal Pro Forms. Cannot find any of these items. A search on Paypal for “Paypal Pro Forms” takes me to a sales area that outlines Pro benefits. Completely lost at this point.

  15. Ray Gulick

    The ability to have recurring payments is another $30/mo on top of the $30/mo for Website Payments Pro, for a grand total of $60/mo. Your article does not mention this, but makes it sound as though Website Payments Pro is all that is needed. Perhaps that was the case when you wrote the article in Aug. 2010, but no more.

  16. Jorja

    Wow that was unusual. I just wrote an incredibly
    long comment but after I clicked submit my comment didn’t show up.
    Grrrr… well I’m not writing all that over again.
    Regardless, just wanted to say great blog!

Comments are closed.