Using Stripe for Members only Group and Category

(Jason Wojo) #1

We are going to have a category with permissions so that only users in a certain group can access a category or possibly a few categories over time. We are planning on using Stripe as the payment gateway to try and give the user a clean on-site experience. We also have a wordpress site connected so another option is to manage the sign up via WP using Gravity forms and Stripe so we can collect some user info.

My main concern is that the workflow could become cumbersome if the user has to enter information at too many steps. Most will want to use Google or Twitter for login, and I’m not sure how to manage this and the payment workflow and information capture so it is seamless and they don’t have one process for registration and another for payment that doesn’t feel connected.

Does anybody have advice on the best workflow. Hopefully we will do this as a plugin other users can also use.

Option 1:

  1. User goes to Discourse site
  2. User registers with Google account
  3. User has access to open portions of site now, but must pay to be added to the members group
  4. User is prompted to pay
  5. They complete payment using Stripe and land in the category that is exclusive to the members group

Option 2:

  1. User goes to Discourse site
  2. User is prompted to make payment and does so via Stripe.js
  3. After successful payment, user sees standard Discourse registration window and registers.

Option 3:

  1. User registers on Wordpress using Gravity forms and Stripe integration
  2. WP passes code in link or somehow shares info so that user registers with Google or Twitter and is added to members group.

On the last one, I’m not sure how to make that experience smooth so the user isn’t registering twice basically.

Any thoughts ideas or other options I should look at?

(Nelson) #2

Just a thought. Could you do something like callback hook when user pay with stripe. then send email to user registered email address to enable the protected content.


Any update on using Stripe to pay for membership payments?

(Adam Capriola) #4

I’m trying to determine the best way to do this too, and unfortunately I think you’ll need to use some kind of dedicated membership software to make it happen, depending on how you define a “member” (recurring and one-time payments are different animals). It also matters whether you have member content on the WordPress portion of the site (which I’ll assume you do).

For a one-time payment, I think Gravity Forms might work. You’d need to have the user register and log in through WordPress, then use SSO to have them be logged in to Discourse too.

I’m pretty sure Gravity Forms has some type of payment form where a user gets assigned a new role in WordPress (I may be mistaken though). You then need to have WordPress communicate somehow to Discourse that when a user has a certain WordPress role (or capability) that they should be added to a specific group in Discourse.

(I want to mention it’s extremely inconvenient that a user can only be assigned one role, the Discourse equivalent of a group, in WordPress; the WP gods really should address that.)

For a recurring payment membership, it’s more complicated. Gravity Forms can’t handle that (last I checked). You will need membership management software because something has to check for the expiry and renewal of the memberships (they aren’t indefinite).

Some membership software is integrated with WordPress as a plugin, so the login will be WordPress native, but other (more powerful) software is separate and would have its own login (that then signs into WordPress).

You’d again need to set up some type of SSO and have communication to map a role/capability->group. You have to work from outside Discourse and lead in.

Ideally there would be some simple overarching membership software that has an easy way to plug in to both WordPress and Discourse. It would then communicate to each separately regarding what role/capability/group gets added to each user, based on their membership. (And hopefully allow multiple membership/subscription types per user.)

aMember can do this type of thing (but barely… I’m always afraid it’s going to break on me). DAP is similar from what I hear. Memberful is newer and looks promising, though I’m still trying to find out more about it. The problem I see with it is that it’s only meant for payments (so like a user can’t register for free and then be managed in the system).

EDIT: Upon further inspection, it looks like the registration and logins are handled by Memberful. I imagine it probably isn’t too difficult to get Discourse hooked in.

(Daniel Thorson) #5

@AdamCapriola what would the process of ‘hooking Discourse in’ to Memberful look like?

(Adam Capriola) #6

I’m not sure. I’ve only played around with Memberful a small amount because it’s not quite where I need it to be for my website (it doesn’t allow a user to register a plain free account on your site yet; they must purchase a membership to be added to the Memberful system).

I asked them about possible Discourse integration and this is what they said:

We’ve got a couple of customers using bbPress to power forums on their site, and this works pretty seamlessly with Memberful, as WordPress handles signing folks into bbPress. We’ve been watching Discourse with a keen interest, but given that it’s a somewhat specialised app that requires a fair bit of setup (you need to get a VPS with a few GB of RAM to run it comfortably) we’re not confident this is something that we should invest a lot of time at the moment. That said, we’d be more than happy to offer pointers and whatnot if you need help creating an integration with Discourse!

(Chris Enns) #7

New to discourse and wanting to see if anyone’s had luck with any sort of membership option for Discourse - with or without a WordPress connection.

(Adam Capriola) #8

Yes, I have a membership site which uses WordPress for the member management and then syncs permissions to Discourse. I helped @LeoB with a similar setup.

(Chris Enns) #9

Oh that’s good to hear. I’m still thinking through an idea for a site but glad to know it’s possible.

Any documentation or anything written up anywhere I could read? Or is this something you do for people/clients?

(Adam Capriola) #10

I’ve posted some example bits and pieces of code I use:

It’s a bit more intensive what I’ve posted to achieve a really tight integration, but that should get you started. I should be available to do custom integration if you need me down the line.

(Chris Enns) #11

Thanks for the tip/links/etc. It looks slightly over my head but if I dive in and drown I’ll send you a note for some hired help! :slight_smile:

(Wolfgang Maehr) #12

Any further developments on this front? It would be a very useful feature for me to have as well… if there is crowdfunding, I’d happily chip in!

(Drew Strojny) #13

I wanted to update this discussion and let everyone know we’ve put together a step by step tutorial for integrating Discourse with Memberful via the wp-discourse plugin.

It’s been tested thoroughly and works well.

(Drew Strojny) #14

We’ve now also added support for free registration @AdamCapriola.


has anyone tried this memberful and fully integrated on live production site we are also planning to put up a paid membership discussion site :slight_smile:

if yes can you linked one?


still coming soon for woocommerce + discourse Discourse & WooCommerce Integrations | Zapier

(Drew Strojny) #17

Update: We now have a full integration with Discourse over at Memberful (membership software for Stripe). It leverages the Discourse SSO settings to sign users in directly through Memberful. It doesn’t require WordPress, but you can use it in tandem with our WordPress integration.

We sync any active subscription plans as Discourse Groups, making it easy to set up protected / paid Discourse Categories.

(Discourse.PRO) #18

My «Paid Membership» plugin could be the option. Currently is supports PayPal (and credit cards through PayPal) payments only (chosen as the most pupular) but I can connect ity to another payment gateway if PayPal is not sufficient.

(Andrew ) #19

Does anyone have a solution that bridges WordPress, membership (via Stripe/PayPal), and Discourse?

(1) Using WordPress SSO just isn’t as nice as Discourse’s login, and (2) there doesn’t seem to be a non-custom route to getting WP to use the SSO feature of Discourse.

After many conversations with the very helpful @drewstrojny, I can’t use Memberful while utilizing the Discourse login either, and this also precludes (3) social login. If your use-case fits their system, I can report amazing support, and I’m really bummed I can’t use Memberful. It seems the only way I could get it to work would be somehow live-syncing Memberful with Discourse on the back-end, and that’s out of my league.

Please tell me I’m wrong and that there’s a solution I’m missing. Pretty please?

(Jeff Atwood) #20

This is something I am open to building but we would need an Enterprise hosting contract to do it.