A healthy membership site means that your gateway and your membership site orders are in perfect sync. Every payment received through the gateway is communicated to the membership site, and all members have accounts in good standing.
This guide will explain how a properly configured PMPro site will retry payments, then automatically cancel membership after failed payment.
Recurring Payment Failures and “Dunning”
Wikipedia explains dunning as the process of methodically communicating with customers who have an outstanding payment. When you evaluate metrics like member churn and retention rates, you must also understand how an outstanding or failed payment is technically handled in the context of your PMPro membership site.
How PMPro Handles Failed Payments
Before we explain the process of payment failures in PMPro, it is important to note that the cancellation process varies by payment gateway. Additionally, some sites put custom code in place to modify default cancellation behavior. With that housekeeping out of the way, we can move on to explains the baseline process in PMPro.
For most gateways connected to PMPro, a failed payment will retry several times before the gateway finally terminates the subscription. When a payment fails, the user and the admin receive the email. Users can then take action to update their payment method directly on your site through the Billing Information page.
If the user does not resolve the payment failure, the payment gateway will terminate the subscription according to the retry rules set up in your gateway account. PMPro processes the subscription cancellation received from the gateway and cancels the user’s membership. The user and the admin receive a final cancellation email.
Cancel Membership After Failed Payment: Gateway-Specific Retry Schedules
- Stripe: In your Stripe dashboard, navigate to Settings > Billing > Subscriptions and emails. Locate the “Manage failed payments” section and configure the steps you’d like to take when charging a customer’s payment method fails.
- PayPal: For all PayPal integrations, we set a
MAXFAILEDPAYMENTSvalue to “1” (see the PayPal documentation on this request value).
Cancel Membership After First Failed Payment
If you are not using one of the gateways highlighted above, we recommend using the custom recipe below to cancel membership immediately after the first failed payment. This is particularly important if you are using Authorize.net as your payment gateway as they do not currently offer any settings to trigger cancellation after payment failure.
What if your gateway and membership data gets out of sync?
If you have had an issue with your Stripe webhooks or PayPal IPN, your membership site may include members that have no active subscription at the gateway. For each member that is out of sync navigate to the Users screen in the WordPress admin and locate the user. On the Edit User page, locate the “Membership Level” section and change it to “None”. This will terminate the user’s active membership.
You can optionally send the default email to this user and communicate the change, or email them manually and include a link to your membership checkout page so they set up a new recurring subscription.