Connecting Stripe

« MemberPress Users Manual

Video Instructions

What This Video Covers

  • 0:00 – 0:30 – Introduction and adding the new gateway option
  • 0:30 – 1:35 – Enabling Test Mode and entering Test Keys
  • 1:35 – 2:36 – Entering Webhook for Test Mode and Saving
  • 2:36 – 3:40 – Switching to Live Mode and entering Live Keys
  • 3:40 – End – Entering Webhook for Live Mode and Conclusion

Basic steps to follow when setting up Stripe as a payment gateway:

  1. Go to MemberPress Options > Payments Tab.
  2. Click the plus button and select the gateway “Stripe”.
  3. Name it whatever you want.  This is the name that your users will see when they go to select how to pay.
  4. Go your Stripe dashboard to obtain the necessary keys: test secret key, test publishable key, live secret key, and/or live publishable key.
  5. In Stripe, navigate to API on the left hand menu.
  6. Select API.
  7. Copy and paste the keys to your MemberPress settings.
  8. Copy your “Stripe Webhook URL” from your MemberPress setup page.
  9. Navigate back to your API settings in Stripe.
  10. Select Webhooks.
  11. Select “+ Add endpoint” and paste your unique Webhook into the settings. Make sure to select the correct Live or Test events, that you are on the latest Webhook version, and that you have it set to send all event types.
  12. Save all settings.

Detailed List of Gateway Settings

Below you will find explanations for every setting that you can find for your PayPal Standard Gateway as a reference for both during and after you have setup your gateway:

  • Name – The name users will see when choosing this gateway option during registration.
  • Gateway – This should be set to “Stripe” and will not show up on the frontend.
  • ID – ID of your gateway used in database and to be entered if importing subscriptions for this gateway as outlined here.
  • Show Payment Label – When checked or unchecked, this will show or hide the Name you entered for this gateway option.
  • Show Payment Icon – When checked or unchecked, this will show or hide the Stripe Credit Card symbols for this gateway option.
  • Show Payment Description – When checked or unchecked, this will show or hide the description for this gateway option.
  • Test/Live Secret Key – This is where you will enter your Stripe Secret Key for either Test or Live Mode. Before entering your Test Secret Key, be sure to check the Test Mode box in your Stripe gateway in MemberPress. Both Keys (though only one will show based on the selected mode) can be found by going to your Stripe Dashboard > clicking API near the bottom left of the page > and make sure that API is selected near the top of the page (though it should default to API). Once in there, you will need to click the box that is labeled, “Reveal test key secret,” then be sure to properly copy and paste that into the correct location in MemberPress for your Stripe gateway option.
  • Test/Live Publishable Key – This is where you will enter your Stripe Publishable Key for either Test or Live Mode. Before entering your Test Publishable Key, be sure to check the Test Mode box in your Stripe gateway in MemberPress. To find these keys, please see the above item. Be sure to properly copy and paste the key into the correct location in MemberPress for your Stripe gateway option.
  • Test Mode – Check this box if you would like to use Stripe in Test Mode for Testing. IMPORTANT NOTE: because of how Stripe works, you will NOT be able to simply check this option and start testing! You will have to follow our instructions in the above video to setup Stripe in Test Mode. You can find this between minute 0:30 and 2:36 in the above video.
  • Force SSL – Use this option if your site has the option of being viewed in http and https. This will automatically switch to https when a user is going to pay so that the transaction is secure.
  • Send Debug EmailsOnly enable this option if you are having issues with your Stripe gateway and know how interpret debug emails or have been told to enable them by our support team. Enabling this option will send out about 5 separate debug emails to your email found in your General WordPress Settings.
  • Stripe Webhook URL – The Webhook URL is used to communicate data between your Stripe account and MemberPress. It must be entered correctly for either Test or Live Modes to work correctly. Use the clipboard icon to copy over your Wehbook URL. Then go to your Stripe Dashboard > API > Webhooks. When creating the Webhook, make sure that you select the correct Live or Test events, that you are on the latest Webhook version, and that you have it set to send all event types, then click “Add endpoint”.

How to Test with Stripe

First, you will need to set your gateway to test mode. You can review how to do this in the above video between the beginning and minute 2:36. When going through the registration process as a new user would, you will need to present test card credentials. Here you can find the list of approved Stripe Test Card credentials. For additional info on testing in MemberPress, please see this page.

How to Process a Refund

To learn how to process a refund within Stripe, please follow this link.

Gateway Issues

If you have followed exactly the instructions on this page for setting up your gateway, then it should work properly. So, if you are noticing issues with your gateway, it is likely going to be related to one of the items listed below. We have also included what to do if you are seeing these issues.

  1. Subscriptions and/or Transactions aren’t updating correctly – If you are seeing subscriptions connecting to MemberPress with an ID that looks like mp-sub-xxxxxxxxxx and transactions that have ID’s that look like mp-txn-xxxxxxxxxx then the issue is related to your Webhook URL configuration. Please be certain that you have correctly entered your Webhook URL. You can review how to do this between minute 1:35 and 2:36 for Test Mode or between minute 3:40 and the end for Live Mode in the above video.
  2. Users are getting this error upon checkout: Invalid API Key provided: pk_test_***********1234 – This means that you have incorrectly entered your API Key. Make sure that you have entered the correct keys into their corresponding locations in MemberPress.
  3. You or the user aren’t receiving the MemberPress Welcome email, New user sign up email, or other MemberPress emails – These new user MemberPress emails are triggered during the registration process by a completed transaction. If the transaction isn’t completing in MemberPress, but is marked as such in Stripe, then this is related to the Webhook URL not being setup correctly. You can review how to do this between minute 1:35 and 2:36 for Test Mode or between minute 3:40 and the end for Live Mode in the above video.
  4. You received an email from Stripe with this subject or similar: Problem with your Stripe webhook (https://yoursite.com/mepr/notify/df5436-452/whk) – This email could be triggered by one of the following three items: (1) Test mode webhooks are failing because test mode data has been deleted, and the site is Live. To resolve simply delete your test mode webhook from Stripe. (2) TLS/SSL certificate issues. Stripe refuses to send the webhook because it doesn’t like the SSL setup on the site. To resolve you will need to contact whoever you purchased your SSL/TLS certifate through to make sure your certificate is up to date with the current standards that Stripe is looking for. (3) 403 error caused by an anti-spam or security plugin. To resolve you will need to find the plugin causing the issue by deactivating any plugin fitting that criteria. If the issue goes away after deactivating the plugin, then you will know that is the plugin that was causing the issue.

Help?

Are you still having issues with your Stripe gateway even after reviewing the solutions outlined in the Gateway Issues section above? No problem, just send us a support ticket with a brief description of your issue, and what you have found in your tests so far. Please do not send us a support ticket until after you have followed the instructions in the Gateway Issues section to the best of your ability . . . we will ask you to review those things if your issue resembles any of those listed points. : )