Paid Memberships Pro works great with Stripe. It is our gateway of choice when the option is available.
In the Stripe dashboard, you will notice that they have a way to create “plans” and “coupons” and to apply them to customers and customer subscriptions. These are really useful features, but PMPro doesn’t use them how you might expect.
First, we don’t integrate with Stripe coupons at all. The “discount codes” that are setup in PMPro are only managed on the WP/PMPro side of things. We don’t mirror the discount codes in Stripe. Instead, when a user checks out on your site using a discount code, we adjust the pricing before sending the charge or subscription request to Stripe.
So how is that done? What we do is every time someone checks out on your site, we create a brand new plan. Then we adjust the pricing of the plan based on discount codes or addons or other custom code and pass the custom plan to the Stripe API to setup a subscription. Once that is done, we delete the plan we created. This doesn’t delete the subscription for the customer, but it does keep all of these custom one-time-use plans from littering up your Stripe dashboard.
We do things this way because it gives us greater flexibility over the price and other settings of a subscription when we set it up through the Stripe API. Different addons and custom code might adjust the pricing of plan at checkout and we like that this is possible. It also makes things more similar to how we do things with the other gateways which allows us to avoid a certain amount of custom code just to support the Stripe API.
There is a downside to doing things this way, and that is that you can’t take advantage of some of the cool reporting Stripe has for plans and coupons. You can’t glance in Stripe and see how many people signed up for your Gold Level/Plan because to Stripe it looks like everyone gets their own plan. Hopefully the PMPro reports make up for this.
What can be done? Braintree has an API that is similar to Stripe’s, but in the Braintree subscription API method they allow you to adjust the price and term of the plan before applying it. As far as I know, this is not available in the Stripe API yet. It would be a really cool feature and would allow us to reuse plans instead of creating news ones with each checkout. (Ironically, Braintree doesn’t allow the creation of plans via the API so you need to create a standard plan in Braintree first. But after that, everyone is given that plan even if you adjust the price or other values for them specifically.)
Hope this clears some things up.