9
2 Comments

Sell gated content in WordPress using Stripe Billing

Hi Indie Hackers! I'm building out guides for a WordPress plugin for Stripe Billing. I would love to get your feedback on this blog post. Here is my first take:


This plugin allows you to easily sell course membership subscriptions or even SaaS features. Imagine you're trying to sell stock market courses using a simple WordPress website. You want to turn a portion of it into a members-only space where you teach more in-depth courses. You may have a couple of different tiers, with the top tier allowing access to additional resources.

This plugin uses Billflow embeddable billing pages on top of Stripe Billing to allow gated content and features. Here's how it works:

1. βž• Create a product for each tier in Stripe

Add two metadata on each product. sb_service and sb_tier. The first tag, sb_service, should be the same for each product you create since it explains the service you are selling. It is going to act as the overarching parent product. sb_tier should be the name of each tier you have available.

sb_service [PRODUCT NAME]
sb_tier [TIER]

2. ⬇️ Install & activate the Billflow plugin.

Once you've activated the plugin, you'll want to set up you account details in the Billflow tab on your WP dashboard. If you haven't done so already, create an account here and paste over your Billflow secret key.

Plugin + demo πŸ‘‰ http://wp.billflow.io/
[ Video demo πŸ‘‰ https://youtu.be/G2cJljY3NS0 ]

3. πŸ“πŸ‘₯ Map user roles to tiers:

In order to successfully gate your content, you want to map WP user roles to specific tiers. For example, users in the Basic tier = "subscriber" while users in the Pro tier = "contributor".

You can achieve this using the Billflow "User Roles" tab on your dashboard.

Add a little spice: to customize user role titles beyond what WP generates, you can use the "Members" plugin by Memberpress. This would allow you to generate more clear names such as, "Basic Subscriber" or "Pro Subscriber" which you could then map to the Basic and Pro tier respectively.

[ Video Demo πŸ‘‰ https://youtu.be/Xj4iYyZxkAg ]

4. βœ… Set up user role permissions:

Now that you've let WordPress know what to call users from different tiers, it's time to define what each role is permitted to do.

With Billflow's library of shortcodes, you can gate single pages that you want to restrict for members of a specific tier.

You can even install the "Restrict User Access" plugin to gate your content on a larger scale. For example:

"Basic Subscriber" = can only access X and Y Pages that have "bob" as the author
"Pro subscriber" = can access X, Y, and Z Pages without any other restrictions

(You can get pretty crazy with it.)

[ Video Demo πŸ‘‰ https://youtu.be/77Pz8fWj6JI ]

5. πŸ”„ Handle events that happen outside of WordPress in Stripe using Webhooks:

Define the information you need Stripe to relay back to WP so that user permissions are honored when a user upgrades, downgrades, or cancels.

Add your secret and signing keys to the Billflow "Stripe Webhooks" tab in WordPress.

[ Video Demo πŸ‘‰ https://youtu.be/Nk4YyNjGZxw ]

6. 🧩 Create your billing pages in Billflow & embed the shortcodes on their designated WordPress pages

For each billing page embed, you'll want to create a new page. If you're using the Pricing Page embed, you'll want to create the WP page that's going to host the Portal first. You'll need to redirect to this URL once a user has signed up.

7. ☁️ Publish that baby and start spreading the word about your service :)

Remember that this part is just as, if not more, important as creating the service itself!

You can refer to each of these steps via this playlist: πŸ€— https://youtube.com/playlist?list=PL0Yv_AvSwjP_Y8IRnOxNLp2b3c6yPO0Oo


What did you think about this guide and how can I improve it?

If you are currently using WordPress or planning to sell subscriptions, I'd love to learn more πŸ™‚

  1. 1

    Hi,
    This looks really good,
    what advantage does we have using Billflow over the native Membership functionality that Wordpress provides

    1. 1

      Hi @ghulamkhansaab Billflow uses the native Wordpress membership functionality and connects it to Stripe Billing subscription.

      That's actually one of the benefits of using Billflow plugin - it just works seamlessly with Wordpress rather than adding more complexities to memberships. The plugin looks at the Wordpress membership emails and detects if the user has an active subscription in Stripe or not.

Trending on Indie Hackers
Reaching $100k MRR Organically in 12 months 29 comments 87.7% of entrepreneurs struggle with at least one mental health issue 12 comments How to Secure #1 on Product Hunt: DO’s and DON'Ts / Experience from PitchBob – AI Pitch Deck Generator & Founders Co-Pilot 11 comments Worst Hire - my lessons 11 comments Competing with a substitute? πŸ“Œ Here are 4 ad examples you can use [from TOP to BOTTOM of funnel] 10 comments Indie hackers selling to indie hackers? 7 comments