A smooth WooCommerce payment gateway integration is invisible to customers: they pick a payment method, pay, and get a confirmation. Behind that, your shop, the payment provider and the bank pass messages back and forth, and small configuration mistakes can mean unpaid orders marked as paid, or paid orders stuck in “pending”.

This guide explains how gateways work in WooCommerce, how to choose one, official extensions versus third-party plugins, webhooks and refunds, checkout block compatibility, security basics, and when a custom gateway makes sense.

Illustration of a store node, a red gateway ring and a vault connected by glowing pipelines, representing WooCommerce payment gateway integration
Your store, the gateway and the bank pass messages in both directions for every order.

How WooCommerce payment gateway integration works

In WooCommerce, each payment method is a plugin that adds a gateway class. WooCommerce's developer documentation describes four broad types:

Diagram of the four types of WooCommerce payment gateway integration: redirect, embedded, direct and offline
Redirect and embedded gateways keep card data away from your server, which reduces your security work.

The documentation notes that redirect and embedded gateways send data off-site, so there are fewer security issues for you to think about, while direct gateways need server security and may require a level of PCI compliance.

Choosing a gateway: fees, countries, payouts

The right gateway depends on where you trade and how your customers like to pay.

Checklist for choosing a gateway before a WooCommerce payment gateway integration, covering countries, payment methods, fees, payouts and refunds
Check country support and customer payment methods first; everything else follows.

Think about your customers' habits too. Business buyers may expect to pay by invoice or bank transfer, while shoppers on mobile often prefer wallets that skip typing card details. Look at your own enquiries and abandoned checkouts for clues before adding methods you may not need.

Offering one card gateway plus one popular local method usually covers most customers without cluttering the checkout.

Official extensions vs third-party plugins

Most major providers publish or endorse an official WooCommerce extension, such as WooPayments, the Stripe extension, PayPal Payments and Razorpay for WooCommerce. Official plugins tend to track WooCommerce changes and the provider's own API updates more closely.

Third-party plugins can fill gaps, for example local providers without an official plugin, but check them carefully: recent updates, compatibility with your WooCommerce version, support response and reviews from stores like yours. Payment plugins touch money and customer data, so the bar should be high. Gateways and extra scripts also affect checkout speed; see how to speed up a WooCommerce store.

Webhooks, refunds and order statuses

Many payment events happen after the customer leaves your checkout: a bank confirms a payment, a customer disputes a charge, or a subscription renews. Providers send these events to your site as webhooks. Stripe's documentation describes webhooks as the way your integration hears about these asynchronous events.

Five-step flow showing how webhooks update order statuses in a WooCommerce payment gateway integration
If webhooks are not set up, orders can stay pending even though the customer has paid.
Watch for stuck orders. A sudden rise in “pending payment” orders often means webhooks have stopped arriving, for example after a migration, a firewall change or a security plugin blocking the endpoint.

Checkout blocks compatibility

WooCommerce's Cart and Checkout blocks have been the default for new stores since version 8.3 in November 2023. Payment methods need a separate integration to appear in the Checkout block; WooCommerce's developer documentation explains that gateways register with the block using registerPaymentMethod.

Before switching an established store from the classic shortcode checkout to blocks, confirm every payment plugin you use supports the Checkout block. If one does not, it may simply not show as an option, which can quietly cost you sales.

Security, PCI and testing in sandbox

PCI DSS is the card industry's security standard. Stripe's integration security guide describes compliance as a shared responsibility: Stripe is certified as a Level 1 service provider, and businesses must accept payments in a compliant way. Its low-risk integrations send card data straight to Stripe without passing through your server, which reduces your obligations.

Illustration of a blank red payment card being scanned inside a sealed test chamber, representing sandbox testing for a WooCommerce payment gateway integration
Test every payment path in sandbox mode before real customers use it.

When you need a custom gateway

A custom gateway makes sense when your provider has no reliable WooCommerce plugin, when you need a specific flow such as deposits or invoicing through a bank's API, or when an existing plugin is unmaintained. WooCommerce gateways are built as plugins that extend the WC_Payment_Gateway class, and should mark paid orders with payment_complete() so stock and statuses update correctly.

Custom payment code needs careful testing, ongoing updates and a plan for Checkout block support. For budgeting, see custom WordPress plugin cost factors. If you are still choosing a platform, my comparison of WordPress and Shopify for small businesses may help, and payment data often connects to forms and CRMs as described in WordPress forms and integrations.

Frequently Asked Questions

Which payment gateway is best for WooCommerce?

It depends on your country, customers and products. Compare supported countries, payment methods, fees, payouts and Checkout block support, and prefer an official, well-maintained extension.

Do I need PCI compliance for WooCommerce?

If you accept card payments, yes, but redirect and embedded gateways that keep card data off your server greatly reduce what you need to do. Check your provider's guidance for your setup.

Why are my WooCommerce orders stuck on pending payment?

Often because webhooks from the gateway are not reaching your site. Check the webhook settings in the gateway plugin and look for firewalls or security plugins blocking the endpoint.

Can I use more than one payment gateway?

Yes. Many stores offer a card gateway plus a local or wallet option. Keep the list short so the checkout stays clear.

Does my payment plugin work with the Checkout block?

Check the plugin's documentation or changelog. Gateways need a specific integration to appear in the Checkout block, so test on staging before switching from the classic checkout.

Final Thoughts

A reliable WooCommerce payment gateway integration comes down to choosing a provider that suits your country and customers, using a well-maintained official plugin where possible, setting up webhooks properly and testing every payment path in sandbox mode before going live. If you need a gateway that no plugin covers, or help untangling a checkout that misbehaves, my custom plugin development service can help.

Official References

Sources checked on 29 October 2026: