1. Home
  2. Docs
  3. Add-Ons
  4. Stripe Integration

Stripe Integration

The LearnDash Stripe integration is one of the simplest ways to start selling your LearnDash courses. Stripe is also one of the easiest payment gateways to set up, and their processing fees are on par with most other gateways.

NOTE
You need to register for a free Stripe account before you can use this integration. Stripe is not available in all countries. View available countries »

While the Stripe integration provides a quick and easy way to sell courses, it doesn’t come with a ton of flexibility. If you’re looking for more robust member management, a customizable checkout experience or integrations with other WordPress plugins or services, check out our ecommerce & membership add-ons.

For another simple way to accept payments, you may also consider our built-in PayPal integration.

Who Should Use the Stripe Integration?

You should consider using the Stripe for LearnDash integration if:

✅ you’re looking for a quick & easy way to start selling courses
✅ you offer one course, or only a few courses, with a simple payment structure

You might not want to use Stripe for LearnDash if:

❌ you want to customize the user’s checkout experience
❌ you are creating a fully functional membership site
❌ you’re selling other products in addition to courses
❌ you want to closely manage the account creation & login process

Walkthrough Video

This video was created using LearnDash version 2.x, but the general setup and all the settings are the same in LearnDash 3.x.

Sign Up for a Stripe Account

  • Navigate to stripe.com and follow the instructions for registering a new account
  • Once your account is set up, you can navigate to dashboard.stripe.com to access all of your account settings, as well as the information you’ll need to set up the LearnDash integration

Install the Stripe Integration

Option 1: Add-ons Menu (requires an active LearnDash license)

  1. In your WordPress admin area, navigate to LEARNDASH LMS > ADD-ONS
  2. Locate the Stripe for LearnDash add-on
  3. Click Install Now
  4. Click the Activate Plugin button

Stripe for LearnDash integration

Option 2: Manual Upload

  1. Download the plugin file (must be logged in to download)
  2. In WordPress, navigate to PLUGINS > ADD NEW
  3. Click Upload Plugin
  4. Browse for the .zip file you downloaded in Step 1
  5. Click Install Now
  6. Click Activate Plugin

Stripe Settings

There are a few unique keys that Stripe creates for you when you set up a new account. You’ll need to provide these keys to LearnDash so that LearnDash can deposit your money in the proper Stripe account.

Test Mode / Live Mode

There are two ways you can set up the LearnDash Stripe integration: test mode or live mode.

  • Test mode should be used when you’re still testing your site internally. No money will actually change hands, but Stripe will record if the transaction succeeded or failed.
  • Live mode should be used when you’re ready to launch your course. All transactions in this mode are real transactions, and money will exchange hands. Once you’ve launched your site, you should stay in live mode indefinitely.

There are two different sets of keys, depending on which mode you’re using.

Integration Type

There are two options for integration type: Legacy Checkout or Checkout (Support SCA).

  • Legacy Checkout captures customer payments in a light-box popup checkout form on your website.
  • Checkout (Support SCA) captures customer payments in a checkout form hosted on the Stripe website. This is to comply with the European PSD2 regulation.

NOTE
See The User Experience section for examples of each checkout method.

SCA Only Settings

If you choose the Checkout (Support SCA) option, then two additional setting fields will appear below the fields where you enter your Stripe Keys.

  • Webhook URL is an auto-generated URL. This URL needs to be pasted to your Stripe account’s webhook settings.
  • Endpoint Secret is a key that is created after you configure your Webhook URL in Stripe.

Add a Stripe Webhook

  1. Login to your Stripe account and navigate to https://dashboard.stripe.com/webhooks
  2. Click the Add endpoint button
  3. From your WordPress dashboard, navigate to LEARNDASH LMS > SETTINGS > STRIPE SETTINGS and copy the auto-generated Webhook URL
  4. Back in Stripe, paste the Webhook URL you copied into the Endpoint URL field
  5. For Version, select the latest API version
  6. Under Events to send, click the receive all events link
  7. Click Add endpoint

Insert the Endpoint Secret

Now that your new webhook is created and enabled, the last thing you need to do is to retrieve your Endpoint Secret so that you can add it to the LearnDash-Stripe integration settings.

  1. Locate the Signing secret section in the webhook you just created and select Click to reveal
  2. Copy the secret key
  3. From your WordPress dashboard, navigate to LEARNDASH LMS > SETTINGS > STRIPE SETTINGS and paste the signing secret into the Endpoint Secret field

Locate Your Stripe Keys

  1. Navigate to your Stripe Dashboard
  2. Click on Developers, then API keys
  3. In the Standard keys section, you’ll see both a “Publishable key” and a “Secret key.” You’ll need both of these keys to set up the LearnDash integration.
  4. Your LIVE keys will be prefixed with pk_live_ and sk_live_

NOTE
These are your LIVE keys. They should be used when you’re ready to launch your site to the public.

Find Stripe API keys, Live Mode

To find your TEST keys…

  1. From the same API keys page, click the “View test data” toggle in the top-right corner
  2. You may need to click the “Reveal key token” button to access your Secret key
  3. You’ll know these are your TEST keys because they’ll be prefixed with pk_test_ and sk_test_

Find Stripe API keys, Test Mode

Insert Stripe Keys

Now that you know how to access your Stripe keys, you need to provide them to LearnDash.

  1. In your WordPress admin area, navigate to LEARNDASH LMS > SETTINGS
  2. Click the Stripe Settings tab at the top
  3. For TEST mode… check the “Test Mode” box to enable test mode, then input your Stripe test keys
  4. For LIVE mode… make sure “Test Mode” is unchecked, and input your Stripe live keys

LearnDash Stripe settings, enter API keys

Currency

You need to set the 3-letter ISO code for the currency you want to use.

For example:

  • USD for United States Dollar
  • CAD for Canadian Dollar
  • AUD for Australian Dollar

See Stripe’s list of supported currencies & ISO codes here.

Return URL (optional)

If no return URL is provided, the user will remain on the course page after their transaction is processed.

But you can choose to send the user to a confirmation page instead. This can be a page you create on your site, with WordPress, a page builder, etc. Or even a page on a completely different domain. It’s entirely up to you.

Enter the full URL, beginning with https://.

Course Configuration

After you’ve configured your Stripe for LearnDash settings, the final thing you need to do is set up your course to accept payments.

  1. In the WordPress admin area, navigate to LEARNDASH LMS > COURSES
  2. Click on the course you’d like to sell with Stripe
  3. Click on Settings at the top
  4. Scroll down to Course Access Settings
  5. Set the “Access Mode” to one of two values:
  • Buy Now: Use “Buy Now” for one-time payments
  • Recurring: Use “Recurring” if you’d like to set up a recurring payment (aka: subscription)

And finally, enter your price in the Course Price field. Ex: 29.99

  • The currency symbol will be added automatically for you
  • If your price is an even dollar amount, you may omit the decimal point & cents (ex: 29)

For recurring payments, you need to include the “Billing Cycle” in days, weeks, months or years.

Setting price on Buy Now course in LearnDash

The User Experience

When users visit your course page, they will see a “Take This Course” button (this language can be customized using custom labels). The user experience will depend on which option you select for the Integration Type.

Legacy Checkout User Experience

When a user clicks the purchase button, they will be presented with a popup window (powered by Stripe), where they can enter payment details and complete their purchase.

Stripe for LearnDash payment modal example

  • The first line is your site’s title, auto-generated from the SETTINGS > GENERAL page in WordPress
  • The smaller text underneath the site title is your course title, which is what you’ve named your course in LearnDash
  • The button will display the price you entered in the “Course Price” field

After payment is complete, a new user account is automatically created, and that user is enrolled into the course they just purchased.

Checkout (Support SCA) User Experience

When a user clicks the purchase button, they will be taken to a secure checkout page (that is hosted on Stripe’s secure servers), where they can enter payment details and complete their purchase.

After payment is complete, a new user account is automatically created, and that user is enrolled into the course they just purchased.

FAQ

Can I use both PayPal AND Stripe?
Yes. You will need to configure the PayPal settings within LearnDash, but once you’ve added that information, along with all the Stripe information, users will be presented with two options when they click the “Take This Course” button. It will look like this:
(design may vary based on your theme)

Payment Button, PayPal or Stripe options

When will I receive my money?
This is determined by your settings in Stripe. Please reference Stripe’s documentation on payouts.

Can I set up recurring payments (aka: subscriptions)?
Yes. In the course settings, just set your “Access Mode” to “Recurring,” and choose a billing cycle.

Can I offer coupons or discounts?
No. The LearnDash Stripe integration does not allow you to offer discounts. Consider using one of our other ecommerce or membership add-ons.

How do I issue refunds and/or cancel subscriptions for my customers?
Issuing refunds and canceling subscriptions is done from your Stripe account, not from LearnDash or this add-on.

Are users automatically removed from a course if they are issued a refund?
No. You can remove the course access from their profile.

Where can I learn more about SCA (Strong Customer Authentication)?
See this article in Stripe’s documentation for more details.

Troubleshooting

My “Take this Course” button is missing.
By default, all site administrators are automatically enrolled in all courses, so they will not see the “Take this Course” button. You can either log out of your account and refresh the page, or view your course page in a private browsing window (or a completely different browser).

Was this article helpful to you?

How can we help?