Stripe Payment Gateway

Paid Member Subscriptions Pro - Stripe - Thumbnail

 
Stripe Add-on allows you to offer credit and debit card payments directly on your website and this way your users do have not leave your website to complete the payment, resulting in a better experience for the user, and more successful conversions for you.
 

Stripe Product* Countries where product is available
Stripe Australia, Canada, Denmark, Finland, Ireland, Norway, Sweden, United Kingdom and United States
Stripe Open-Beta Austria, Belgium, France, Germany, Italy, Japan, Luxembourg, The Netherlands, Spain. Stripe’s open-betas are ready for production use

* Stripe Product Availability – Check Stripe products availability in your country
* Stripe System Status – Check if Stripe System is Online

Stripe Features

Install the Stripe Add-on

Stripe is an Advanced add-on, available with a Paid Member Subscriptions Pro license only.

After purchasing the add-on, the .zip file will be available for download under your account page by clicking the “Add-ons Download” button.

Paid Member Subscriptions Pro - Account Page - Download Add-ons

Once downloaded, you can install the add-on as a normal WordPress plugin, by uploading the .zip file in your WordPress Admin -> Plugins -> Add New -> Upload Plugin.

Alternatively, you can install the Stripe add-on by extracting the folder found inside the archive and uploading the entire folder via FTP to your /wp-content/plugins folder found inside your WordPress install.

Notes – For Stripe add-on to work as expected, you’ll also need to have the following plugins and features to be installed and activated on your site:

Stripe Settings

Once the add-on is activated, navigate to Paid Member Subscriptions -> Settings -> Payments where you’ll find Stripe listed among the Active Payment Gateways.

Make sure to check the payment gateways you want to use on your site. You can also setup a default payment gateway for accepting member payments.

Paid Member Subscriptions Pro - Stripe - Settings

Paid Member Subscriptions Payments Settings that we can setup:

  • Currency – Select your currency. Please note that some payment gateways can have currency restrictions
  • Currency Position – Select whether the currency symbol should appear before the price or after the price
  • Test Mode – By checking this option you will be able to use Paid Member Subscriptions with Test Accounts from your payment processors
  • Active Payment Gateways – Select which Payment Gateways are active on your domain
  • Default Payment Gateway – Select which Payment Gateway is selected by default inside the Registration form
  • Renewal – Select renewal type from “Customer opts in for automatic renewal”, “Always renew automatically” or “Never renew automatically”. The Subscription Renewal feature can override this option

This is how the Paid Member Subscriptions Registration Form looks like after we active the Stripe Payment Gateways:

Paid Member Subscriptions Pro - Stripe - Registration Form

Renewal (Recurring Payments)

You can setup the Stripe Payment Gateway to process recurring payments on your domain. To use the Renewal feature go to Paid Member Subscriptions -> Settings -> Payments -> Renewal.

The Renewal option settings:

  • Customer opts in for automatic renewal – If this option is selected the user will be able to decide if he wants to make a One Time Payment or a Recurring Payment. To make a recurring payment he will need to check inside the Registration form the “Automatically renew subscription” checkbox
  • Always renew automatically – If this option is selected all payments will be Recurring
  • Never renew automatically – If this option is selected all payments will be One Time Payments

Paid Member Subscriptions Pro - Stripe - Renewal

Starting with Paid Member Subscription v1.5.0 you can setup the Renewal feature based on Subscription Plan. The Renewal option setup inside the Subscription Plan will overwrite the Renewal option setup in the Settings page.

Paid Member Subscriptions - Subscription Plans - Renewal

Sing-up Fee

Starting with Paid Member Subscriptions Pro v1.5.0 you can setup Sing-up Fees for your Subscription Plans. The Sing-up Fee represents the amount that you can charge people upfront when subscribing to a Subscription Plan.

To setup the Sign-up Fee option go to Paid Member Subscriptions -> Subscription Plans -> Edit your Subscription plan -> Setup Sign-up Fee.

Based on the example below users will need to pay $70 for the Gold plan and also the $10 Sing-up Fee. Users will pay the Sing-Up Fee only once and doesn’t take in consideration the Renewal option.

Paid Member Subscriptions - Subscription Plans - Sing-up Fee

Free Trial

Starting with Paid Member Subscriptions Pro v1.5.0 you can setup Free Trials for your Subscription Plans. The Free Trial represents the amount of time before charging the first Recurring Payment. The Sign-up Fee applies regardless of the Free Trial.

To setup the Free Trial option go to Paid Member Subscriptions -> Subscription Plans -> Edit your Subscription plan -> Setup Free Trial.

Paid Member Subscriptions - Subscription Plans - Free Trial

Based on the example above users will receive a 1 Month Free Trial if they purchase the Silver Plan. After the expiration of the Subscription Plan users will be able to renew manually the plan from their Account.

If you setup the Renewal option to “Always renew automatically” the Subscription Plan will renew automatically.

Entering your Stripe API Credentials

In order to be able to make payments through Stripe and to use all the Stripe Features you will need to add your Stripe API credentials. Go to Paid Member Subscriptions -> Settings -> Payment Gateways -> Stripe to add your Stripe API Credentials (Stripe Secret and Publishable Keys).

Note – When using Paid Member Subscriptions in Live Mode use your Live Stripe API Credentials and when using Paid Member Subscriptions in Test Mode use your Test Stripe API Credentials

Paid Member Subscriptions Pro - Stripe - API Credentials

Stripe Live and Test API Credentials

You will find your Live and Test API Credentials inside your Stripe Account. After you login go to API and there you should see the Test and Live API Credentials. Also make sure you are using the latest API Version.

Paid Member Subscriptions Pro - Stripe - Account

Setting up Stripe Live and Test Webhooks

Stripe will communicate with your WordPress website through Webhooks. Essentially when a payment is completed, Stripe sends a message to the Webhook you provided. 

The Stripe add-on then captures this message, validates it and makes the needed changes in Paid Member Subscriptions, like completing the Pending Payment, Activating the Member’s Subscription Plan and so on.

In order to add a Live or Test Webhook in Stripe, login inside your Stripe Account -> Go to API -> Click on Webhooks -> Click on the “+ Add endpoint” button -> Set it up and click on “Add endpoint” to finish.

Stripe Webhook Endpoint Settings:

  • URL to be called – https://www.yourdomain.com/?pay_gate_listener=stripe (replace www.yourdomain.com with your domain)
  • Events to send – Create a Webhook for Live events and another one for Test events
  • Webhook version – Use the latest API Version
  • Filter event – Send all event types

Paid Member Subscriptions Pro - Stripe - Add Endpoint

Make sure you create a Webhook for the Test Environment, if you want to test the Stripe Payment Gateway with Paid Member Subscriptions, and also a Webhook for the Live Environment if you want to process live payments with Stripe.

Paid Member Subscriptions Pro - Stripe - Account Webhook

The Webhook Notification URL should be set to:

https://www.yourdomain.com/?pay_gate_listener=stripe

Note – Replace “www.yourdomain.com” with your actual domain name

Generate Stripe Webhook

Add your domain in the field below, example: yourdomain.com, and click on the “Generate Webhook” button. As you can see we need to use https for our domain. Use the generated Webhook inside your Stripe Account.




Send Test Webhook

In order to verify if the Webhook is sent correctly to your domain login inside your Stripe Account -> Go to API -> Webhooks -> Click on your Webhook -> Now you should see the “Send Test Webhook” button.

Paid Member Subscriptions Pro - Stripe - Send Test Webhook

After we click on the “Send Test Wehbook” button we need to set the Event Type to “charge.succeded” and to click on “Send Test Webhook”. If the Test Webhook was sent correctly you should receive the following message: “Test webhook sent successfully”.

Paid Member Subscriptions Pro - Stripe - Successful Webhook

Adding an SSL certificate

An SSL certificate is used to establish a secure encrypted connection.

In order to use the Stripe Add-on you must have an SSL certificate installed on your site.

Online SSL Certificate Checkerhttps://www.ssllabs.com/ssltest/

You can obtain security certificates for free instead of paying for traditional SSL certificates (which cost ~ 80$+/year) and install them much easier using Let’s Encrypt. It is a free, automated and open certificate authority that issues domain-validated certificates.

Up until now, the only hosting company that offers the ability to install let’s encrypt certificates in just a couple of clicks directly from the cPanel of your hosting account is Site Ground. Here’s a quick tutorial on how to achieve that.

This is the by far the quickest and most cost efficient way of adding HTTPS to your membership site we found. If you’re not hosted with Site Ground they even offer you a free transfer of one website per account, removing all the friction normally related to the change of hosting.

TLS v1.2

The most secure protocol for sharing information on the web today is Transport Layer Security (TLS) version 1.2. Stripe is enabling support for TLS 1.2 for all secure connections and in 2017 will start requiring its use.

You will need to verify that your environment supports TLS 1.2 and if necessary make appropriate updates. Stripe is updating its services to require TLS v1.2 for all HTTPS connections and all TLS v1.0 and TLS v1.1 API connections will be refused.

As the Stripe SSL Certificate Requirements says, all interactions between your server and Stripe must use TLS v1.2. Please contact your hosting and tell them to update the TLS of your SSL Certificate to v1.2. Also tell them that there is an issue with SSLv3 that is preventing Stripe to work correctly. A suggestion would be to disable SSLv3 in order to see if the payments are processed correctly.

Add https in WordPress

After you install your SSL Certificate on your domain please go to your website -> Login as Admin -> Access the dashboard -> Settings -> General and make sure you add https inside WordPress Address (URL) / Site Address (URL).

Also we recommend to use a free plugin like Really Simple SSL – It automatically detects your settings and configures your website to run over https.

Paid Member Subscriptions Pro - PayPal Pro and PayPal Express Checkout - Add https

Processing a payment with Stripe

If everything is setup correctly, including the Stripe API Credentials and the Stripe Webhooks, we can process our first Stripe payment on our website.

We will test the payments by using Paid Member Subscriptions in Test Mode. Go to Paid Member Subscriptions -> Settings -> Payments -> Check “Test Mode”. For testing purposes we need to use one of the following credit cards:

Number – CVV 111 Brand
4242424242424242
4012888888881881
4000056655665556
5555555555554444
5200828282828210
5105105105105100
378282246310005
371449635398431
6011111111111117
6011000990139424
30569309025904
38520000023237
3530111333300000
3566002020360505
Visa
Visa
Visa (debit)
Mastercard
Mastercard (debit)
Mastercard (prepaid)
American Express
American Express
Discover
Discover
Diners Club
Diners Club
JCB
JCB

One Time Payment

Inside our Registration form we display 3 Subscription Plans: Free, Silver and Gold and the Renewal option is set to “Customer opts in for automatic renewal”.

Paid Member Subscriptions Pro - Stripe - One Time Payment

This is how the payment looks like in Paid Member Subscriptions -> Payments.

Paid Member Subscriptions Pro - Stripe - One Time Completed Payment

Recurring Payment

To make a recurring payment when the Renewal option is set to “Customer opts in for automatic renewal” the user will need to check the “Automatically renew subscription” checkbox.

Paid Member Subscriptions Pro - Stripe - Recurring Payment

This is how the payment looks like in Paid Member Subscriptions -> Payments.

Paid Member Subscriptions Pro - Stripe - Recurring Completed Payment

Sing-up Fee Payment

To use the “Sign-up Fee” Feature we need to go to Paid Member Subscriptions -> Subscription Plans -> Edit our Subscription Plan and to setup the amount for the Sign-up Fee. Users will pay the Sing-Up Fee only once. The Renewal feature is set to “Customer opts in for automatic renewal”

Paid Member Subscriptions - Subscription Plans - Sing-up Fee

This is how the Paid Member Subscriptions Registration Form looks like after we setup the Sign-up Fee.

Paid Member Subscriptions Pro - Stripe - Sing-up Fee Payment

This is how the payment looks like in Paid Member Subscriptions -> Payments.

Paid Member Subscriptions Pro - Stripe - Sing-up Fee Completed Payment

Free Trial Payment

To use the “Free Trial” Feature we need to go to Paid Member Subscriptions -> Subscription Plans -> Edit our Subscription Plan and to setup the amount for the Free Trial. The Sign-up Fee applies regardless of the Free Trial. The Renewal feature is set to “Customer opts in for automatic renewal”.

If you setup the Renewal option to “Always renew automatically” the Subscription Plan will renew automatically.

Based on the example below users will receive a 1 Month Free Trial if they purchase the Silver Plan. After the expiration of the Subscription Plan users will be able to renew manually the plan from their Account.

Paid Member Subscriptions - Subscription Plans - Free Trial

This is how the Paid Member Subscriptions Registration Form looks like after we setup the Free Trial.

Paid Member Subscriptions Pro - Stripe - Free Trial Payment

Since this is a Free Trial Payment, and not an actual payment, you will not see it in Paid Member Subscriptions -> Payments. You will need to go to Paid Member Subscriptions -> Members.

Paid Member Subscriptions Pro - Stripe - Free Trial Payment - Members

Based on the example above, the actual payment will take place on 24/08/2017 when the Free Trial expires. The user can view these details inside his Account -> View Details.

Paid Member Subscriptions Pro - Stripe - Free Trial Payment - Member Account

Get Stripe – Paid Member Subscriptions Add-on