If you collect payments for membership on your website, the Simple Membership Plugin allows you to easily do so. While some SWPM customers use PayPal to accept payments, others prefer to use Stripe. For those that wish to use Stripe, the option to create SCA compliant Buy Now Buttons and Subscription Buttons have now been implemented in the plugin. This allows those within Europe to meet the Strong Customer Authentication (SCA) requirements as well.
In this tutorial we will cover how you can create a Stripe Subscription Button to collect membership payments from your customers.
What is SCA Compliance?
SCA for short also known as Strong Customer Authentication is a requirement of the EU Revised Directive on payment service providers (such as Stripe) within the European Economic Area. The requirement ensures that all electronically received payments are performed with multi-factor authentication, to increase the security of sensitive information.
How Can I Create a Stripe Subscription Button (SCA Compliant)?
If you wish for your members to subscribe and be charged weekly, monthly, yearly etc rather than just once off, you will need to create a subscription style button. Follow the steps below to configure an SCA compliant subscription (recurring) payment button for memberships on your WordPress website:
Step 1) Ensure you have the latest version of the Simple Membership Plugin installed and activated on your WordPress website. Also ensure you have created a membership level to hook your payments to.
Step 2) Click on ‘WP Membership‘ and then on the ‘Payments‘ menu.
Step 3) From the ‘Payments‘ menu you will see a tab titled ‘Create New Button‘.
Step 4) Once you click on the ‘Create New Button‘ tab, you will need to select ‘Stripe SCA Subscription‘.
Step 5) Click the ‘Next‘ button.
You will need to give your SCA Compliant Stripe Subscription button a: title and choose the membership level that this button is for.
Step 6) Now you will need to log into your Stripe account in a different tab to complete the following steps.
Step 7) Within your Stripe account, click on the ‘Products‘ menu on the left hand side.
Step 8) Click the ‘Add Product‘ button to create a new product for this subscription style button.
Step 9) Give it a simple but meaningful name (this will appear in Stripe checkout). Scroll down to the “Pricing” section and configure the recurring price values according to what you want to charge for the membership. Then click the ‘Save Product‘ button.
Step 10) You have now created the subscription product in your Stripe account. Copy and paste the API ID value of this product from your Stripe account into the Stripe API ID field in the ‘Create New Button‘ interface of the Simple Membership Plugin.
You can find the ‘API ID‘ of your subscription product by clicking on the ‘Products‘ menu in your Stripe dashboard and then clicking on the product in question. The following screenshot shows where to get the “API ID” value.
NOTE: You need to use the “API ID” from your Stripe account into the “Stripe API ID” field of the payment button. Don’t use the “Product ID”. The API ID value looks like the following:
Step 11) Within your Stripe account, click on the ‘Developers‘ menu and then on ‘API Keys‘. You will need to copy your Stripe API keys from your account into the appropriate fields of the ‘Create New Button‘ interface.
Step 12) Create your webhook in your Stripe account by clicking on the ‘Webhooks‘ menu found under ‘Developers‘ menu. Click the ‘Add endpoint‘ to create a new webhook.
Copy and paste the ‘Webhook Endpoint URL‘ from the ‘Create New Button‘ interface and paste it into the ‘Endpoint URL‘ field in your Stripe account.
Choose the following list of events from the ‘Events to Send‘ drop-down menu. Click the ‘Add Endpoint Button‘.
This tells stripe to send a notification to the plugin for the above-mentioned events.
Step 13) Click the ‘Save Payment Data‘.
Step 14) You have now created a new SCA Compliant Stripe Subscription button.
Step 15) You can copy the shortcode of this payment button and add it to any post or page of your choosing.
You can customize the Subscription button text by using the “button_text” parameter in the shortcode. See a shortcode example below:
[swpm_payment_button id=4010 button_text="Subscribe Now"]
What Will My Stripe SCA Subscription Button Look Like?
When you create an SCA Stripe Subscription button, it will appear like any other Simple Membership subscribe button when added to a post or page on your WordPress website. When the customer clicks to subscribe, the checkout will be hosted on Stripe’s website (although the customer will be unaware of this). This allows the process to entirely comply with new online regulations.
Below you can find a screenshot of a SCA Stripe subscription checkout.
What Happens After the Payment?
If this is a payment made by a NEW member then the user will receive an email that contains a special link to complete the registration. Read the registration process overview documentation to learn more.
If the payment is made by an EXISTING member then the membership level (associated with this payment button) is applied to the existing member’s profile.
Note: The member must be logged into the site as a member for this plugin to recognize the user and treat him/her as an existing member.
SSL Certificate Requirement
Stripe payment gateway requires you to have SSL certification on your checkout page (the page where you put your payment button). So the URL of that page should have HTTPS (example: https://yourdomain.com/join-us-page).
If you are not already using an SSL certificate on your site then you should contact your hosting provider and request them to install it for you. This plugin is useful to force your payment page (where you have the Stripe payment button) to be loaded using HTTPS.