Setup Stripe for WooCommerce: The Ultimate Guide
1. Install and Activate the WooCommerce Stripe Gateway Plugin
1.1 Access Your WordPress Dashboard and Navigate to Plugins
Log in to your WordPress admin area by navigating to yourdomain.com/wp-admin
. Once logged in, locate the left-hand navigation menu. Hover over “Plugins” and then click on “Add New” from the fly-out menu. This will take you to the plugin installation page where you can search for new plugins.
1.2 Search for and Install the WooCommerce Stripe Gateway Plugin
On the “Add Plugins” page, you’ll see a search bar on the right side, typically labeled “Search plugins…”. Type “WooCommerce Stripe Gateway” into this search bar and press Enter. The search results will display various plugins. Look for the official plugin titled “WooCommerce Stripe Gateway” developed by WooCommerce. It usually has a distinct logo and high ratings. Click the “Install Now” button next to it. Once installed, the button will change to “Activate.” Click “Activate” to enable the plugin on your site. You should see a success message indicating the plugin is active.
2. Configure Your Stripe Account Credentials
2.1 Obtain Your Stripe API Keys (Publishable and Secret)
To connect WooCommerce to your Stripe account, you need your unique API keys. Open a new browser tab and log in to your Stripe Dashboard at dashboard.stripe.com
. Once logged in, navigate to the left-hand menu. Click on “Developers,” then select “API keys.” You will see two primary keys: “Publishable key” (starts with pk_live_
or pk_test_
) and “Secret key” (starts with sk_live_
or sk_test_
). For the secret key, you’ll likely need to click “Reveal test key” or “Reveal live key” to see the full string. Copy both of these keys to a temporary secure location, as you’ll need them in the next step.
2.2 Enter Your Stripe API Keys into WooCommerce Settings
Return to your WordPress Dashboard. In the left-hand navigation menu, hover over “WooCommerce” and click on “Settings.” On the WooCommerce settings page, click the “Payments” tab at the top. You should now see “Stripe” listed as an available payment gateway. Click on “Manage” next to Stripe. On the Stripe settings page, you’ll find fields for “Publishable key” and “Secret key.” Paste the keys you copied from your Stripe Dashboard into the corresponding fields. Ensure you are pasting the “Live” keys if you intend to process real payments, or “Test” keys if you are setting up a sandbox environment. Click “Save changes” at the bottom of the page.
3. Enable and Configure Stripe Payment Methods
3.1 Enable Specific Stripe Payment Methods (e.g., Credit Card, Apple Pay)
After saving your API keys, you’ll remain on the Stripe settings page within WooCommerce. Scroll down to the “Payment methods” section. Here, you’ll see a list of various payment options supported by Stripe, such as “Credit Card (Stripe)”, “Apple Pay / Google Pay”, “SEPA Direct Debit”, “Klarna”, etc. For each payment method you wish to offer your customers, ensure its corresponding checkbox under the “Enabled” column is checked. For instance, to accept standard credit and debit cards, ensure “Credit Card (Stripe)” is enabled. To offer Apple Pay and Google Pay, enable “Apple Pay / Google Pay”. Click “Save changes” after making your selections.
3.2 Customize Payment Method Display and Descriptions
On the same Stripe settings page in WooCommerce, for each enabled payment method, you can customize its “Title” and “Description” as they appear to your customers on the checkout page. For example, for “Credit Card (Stripe)”, you might change the title to “Credit/Debit Card” and the description to “Pay securely with your Visa, MasterCard, American Express, Discover, or other major credit/debit card.” For “Apple Pay / Google Pay”, you could set the title to “Apple Pay / Google Pay” and the description to “Pay instantly with your saved cards via Apple Pay or Google Pay on supported devices.” These customizations help your customers understand their payment options clearly. Remember to click “Save changes” once you’ve finished customizing the display options.
4. Test Your Stripe Integration and Go Live
4.1 Conduct Test Transactions in Sandbox Mode
Before accepting live payments, it’s crucial to test your setup. Go back to your Stripe settings in WooCommerce (WooCommerce > Settings > Payments > Stripe > Manage). Ensure “Enable Test Mode” is checked. Also, verify that the “Publishable key” and “Secret key” fields contain your *test* API keys (starting with pk_test_
and sk_test_
). Save changes. Now, visit your WooCommerce store’s front end, add a product to your cart, and proceed to checkout. Use Stripe’s test card numbers (e.g., 4242 4242 4242 4242
with any future expiration date and CVC) to complete a purchase. After the transaction, check your Stripe Dashboard (in test mode, toggle the “View test data” switch in the top right) under “Payments” to confirm the test order was received. Also, verify the order status in your WooCommerce admin (WooCommerce > Orders).
4.2 Switch to Live Mode and Verify Successful Payments
Once you’ve successfully completed test transactions, it’s time to go live. Return to your Stripe settings in WooCommerce (WooCommerce > Settings > Payments > Stripe > Manage). Uncheck the “Enable Test Mode” checkbox. Crucially, replace your test API keys with your *live* API keys (starting with pk_live_
and sk_live_
) that you obtained from your Stripe Dashboard in step 2.1. Click “Save changes.” Your store is now configured to accept live payments via Stripe. Make a small real purchase (e.g., set up a cheap test product for $1) using a real credit card. Verify that the payment processes correctly on your Stripe Dashboard (ensure “View test data” is OFF) and that the order appears as “Processing” or “Completed” in your WooCommerce admin. This final verification ensures your live setup is fully functional.
FAQs
Q1: My Stripe payment option isn’t showing up on the checkout page. What should I check?
A1: First, ensure the “WooCommerce Stripe Gateway” plugin is installed and activated under WordPress > Plugins. Second, navigate to WooCommerce > Settings > Payments and verify that “Stripe” is listed and its “Enabled” toggle is set to ON. Third, click “Manage” next to Stripe and ensure that specific payment methods (like “Credit Card (Stripe)”) are enabled and their respective checkboxes are ticked. Finally, double-check that your Stripe API keys are correctly entered and saved, and that you’re not in “Test Mode” if you expect live payments to show, or vice-versa.
Q2: Can I use the same Stripe account for multiple WooCommerce stores?
A2: Yes, you can. A single Stripe account can be connected to multiple WooCommerce stores, or any other platforms. Each store will use the same set of live API keys (Publishable and Secret). Stripe processes payments for your account regardless of the source. However, managing transactions and disputes might become complex if you have a very high volume across many disparate stores, so consider your operational needs.
Q3: What’s the difference between “Publishable” and “Secret” API keys?
A3: The Publishable Key (pk_live_...
or pk_test_...
) is designed to be publicly accessible. It’s used on the client-side (your customer’s browser) to securely create tokens for card details without sensitive information ever touching your server directly. The Secret Key (sk_live_...
or sk_test_...
) is highly sensitive and must be kept strictly confidential on your server. It’s used for making API calls to Stripe’s server, such as creating charges, refunds, or managing customers. Never expose your Secret Key in client-side code or public repositories.
Q4: My test transactions are not appearing in my Stripe Dashboard. What could be wrong?
A4: When conducting test transactions, you must ensure that your Stripe Dashboard is set to “View test data.” There’s a toggle switch, usually in the top right corner of the Stripe Dashboard, that allows you to switch between “Live data” and “Test data.” If your WooCommerce store is in test mode and processing test transactions, you must be viewing “Test data” in your Stripe Dashboard to see them. Conversely, if your store is in live mode, ensure your Stripe Dashboard is viewing “Live data.” Also, double-check that your WooCommerce Stripe settings have “Enable Test Mode” checked and that you’ve entered your *test* API keys.