Accepting credit cards (Stripe & more)
How to accept credit and debit card payments in WooCommerce using Stripe, WooCommerce Payments, or another card processor.
Accepting credit and debit cards is essential for most online stores. This guide explains your options and walks you through getting Stripe set up — the most common card payment solution for WooCommerce stores.
Quick summary
Install either the WooCommerce Payments plugin (the easiest option, built into WooCommerce) or the Stripe for WooCommerce plugin. Connect it to your Stripe account, enable test mode to verify everything works, then switch to live mode. Your customers can then pay with Visa, Mastercard, American Express, and more.
Why Stripe?
Stripe is the world's most widely used payment processor for online businesses. It supports:
- Credit and debit cards (Visa, Mastercard, Amex, Discover, and more)
- Apple Pay and Google Pay (on supported devices)
- Buy Now Pay Later options (Klarna, Afterpay, etc.) via extensions
- Customers in 40+ countries
Stripe charges a flat percentage per transaction with no monthly fee. Their pricing is transparent and easy to understand. Check stripe.com for current rates in your country.
Option 1: WooCommerce Payments (simplest)
WooCommerce Payments is the official, built-in option. It's powered by Stripe behind the scenes but manages everything from your WooCommerce dashboard.
Go to WooCommerce → Settings → Payments.
Find "WooCommerce Payments" in the list and click Set up or Get started.
Follow the onboarding wizard. You'll be asked to connect to or create a Stripe account, verify your identity, and add your bank details.
Enable test mode in the settings to verify everything works before going live.
Turn off test mode when you're ready to accept real payments.
Option 2: Stripe plugin (more control)
If you want to use Stripe's full dashboard and features directly, install the official Stripe WooCommerce plugin.
Install the "WooCommerce Stripe Payment Gateway" plugin. Go to Plugins → Add New, search for "Stripe for WooCommerce" (by WooCommerce), and install it.
Activate the plugin.
Go to WooCommerce → Settings → Payments → Stripe and click Set up.
Enter your Stripe API keys. You'll find these in your Stripe dashboard under Developers → API keys. You need both the Publishable key and the Secret key.
Enable test mode using your Stripe test API keys first.
Test a payment using Stripe's test card numbers (available in Stripe's documentation).
Switch to your live API keys and disable test mode when you're ready.
Never share your Secret key
Your Stripe Secret key is like a password. Never paste it anywhere public, share it in a message, or commit it to a code repository. If you believe it has been exposed, regenerate it in your Stripe dashboard immediately.
Testing before going live
Always test card payments before real customers use your store:
| Test card number | Result |
|---|---|
| 4242 4242 4242 4242 | Successful payment |
| 4000 0000 0000 0002 | Card declined |
| 4000 0025 0000 3155 | Requires authentication (3D Secure) |
Use any future expiry date and any 3-digit CVC when testing. These are Stripe's standard test cards — they only work in test mode.
What customers see at checkout
With Stripe, card details are entered directly on your checkout page (no redirect to another site). This keeps the experience smooth and increases conversions. The payment form is secure by default — card details go directly to Stripe, never through your server.
Common questions
Related guides
- Payment methods explained
- Accepting PayPal
- PCI compliance, in plain English
- Troubleshooting payment problems
- Keeping your store secure
Need a hand?