WWooshPayment docs
Store integration

WooCommerce integration

Connect a WooCommerce store to WooshPayment via REST API. Works with WordPress 6.0+ and WooCommerce 8.0+.

4 min read

The WooCommerce integration uses the official REST API. It works with WordPress 6.0+ and WooCommerce 8.0+. The store must be on HTTPS.

Fastest path โ€” 1-click WordPress plugin โšก โ€” We have an official plugin that automatically intercepts the "Proceed to checkout" button without you touching the theme or writing snippets. You still need to generate the Consumer Key (this guide, step 1-2) to receive orders on WC, but the checkout redirect is handled by the plugin in 2 minutes. โ†’ See plugin install

Continue on this page only if you cannot install plugins on your WordPress (locked server, restricted multisite, etc.).

The WordPress / WooCommerce admin screenshots are illustrative renderings (those would require WordPress admin credentials we can't ship here). Step 2 is a real screenshot of the WooshPayment Dashboard.

1. Generate the API keys in WooCommerce

WordPress Admin: WooCommerce โ†’ Settings โ†’ Advanced โ†’ REST API with Add key form for WooshPayment, Read/Write permissions

  1. WordPress Admin โ†’ WooCommerce โ†’ Settings โ†’ Advanced โ†’ REST API
  2. "Add key"
  3. Description: WooshPayment
  4. Permissions: Read/Write
  5. Save โ€” copy Consumer Key and Consumer Secret (shown only once)

Store the keys in a password manager. If you lose them, you'll have to regenerate them and WooshPayment will stop creating orders until you re-enter them.

2. Connect on WooshPayment

Real screenshot of the WooshPayment Dashboard Integrations page: WooCommerce card in "Not connected" state with the WordPress store URL, Consumer Key, Consumer Secret fields, and the "Connect" button. The Whop card sits above and marketing pixels sit below on the same page

  1. Dashboard โ†’ Settings โ†’ E-commerce platform โ†’ choose WooCommerce
  2. "WooCommerce connection" section โ†’ fill in:
    • Store URL: e.g. https://my-store.com (no trailing slash)
    • Consumer Key: paste
    • Consumer Secret: paste
  3. Save โ†’ WooshPayment pings /wp-json/wc/v3/products?per_page=1 to validate the keys

Credentials are encrypted at rest (AES-256-GCM).

3. Checkout button redirect

Redirect flow: WooCommerce cart with Proceed to checkout button redirecting to the branded checkout at demo-store.wooshpayment.com

Unlike Shopify (where we install the ScriptTag automatically), WooCommerce does not expose an equivalent API to inject JS into the storefront. You have two options:

A) WordPress plugin (recommended) โšก โ€” Our official plugin replaces the "Proceed to checkout" button with a redirect to {slug}.wooshpayment.com. 2 minutes, zero code. โ†’ See plugin install guide

B) Manual snippet in the theme โ€” If you can't install plugins on your WordPress, add this snippet to your child theme's functions.php (or via a Code Snippets plugin):

add_action('wp_footer', function() {
  $slug = 'YOUR-SLUG'; // replace with your WooshPayment slug
  if (!is_checkout() && !is_cart()) return;
  echo "<script>
    document.addEventListener('DOMContentLoaded', function() {
      var btns = document.querySelectorAll('.checkout-button, .wc-proceed-to-checkout a, button[name=\"woocommerce_checkout_place_order\"]');
      btns.forEach(function(b) {
        b.addEventListener('click', function(e) {
          e.preventDefault();
          fetch('https://api.wooshpayment.com/api/checkout/create', {
            method: 'POST',
            headers: { 'Content-Type': 'application/json' },
            body: JSON.stringify({
              shop: location.hostname,
              cartToken: '',
              items: window.wcCart || [],
              totalPrice: 0,
              currency: 'EUR'
            })
          }).then(r => r.json()).then(d => { if (d.checkoutUrl) location.href = d.checkoutUrl; });
        });
      });
    });
  </script>";
});

The items payload here is simplified; see API reference for the full version that maps line items + variants.

4. Verify

Verify: order #1042 visible side-by-side in WooshPayment Dashboard with Completed status and in WooCommerce โ†’ Orders with Processing status

  1. Open the store in incognito
  2. Add a product โ†’ go to the cart
  3. Click "Proceed to checkout"
  4. You must land on {your-slug}.wooshpayment.com/checkout/...
  5. Complete a test payment
  6. Verify the order in WooCommerce โ†’ Orders with status Processing

Order sync

On confirmed payment we call POST /wp-json/wc/v3/orders:

  • Default status: processing (configurable)
  • Order notes: Paid via WooshPayment (session: ch_xxx)
  • payment_method: woopay (or cod for cash on delivery)
  • Customer email: sent by WooCommerce with its own templates

Compatibility

PluginCompatible
WooCommerce SubscriptionsOne-time products only. Subscriptions in roadmap.
WooCommerce BookingsNot supported
Polylang / WPMLYes
WooCommerce PDF InvoicesYes
WooCommerce StripeDisable: WooshPayment uses Whop, not Stripe

Frequent issues

"401 Unauthorized" after connect

  • Check that the site is HTTPS โ€” we don't connect to HTTP
  • Reopen WooCommerce โ†’ REST API and verify the key hasn't been revoked
  • Verify that the permission is "Read/Write" (not just "Read")

Different prices between WooCommerce and WooshPayment

Often a VAT issue. WooshPayment respects WooCommerce's display_prices_including_tax. Check in WooCommerce โ†’ Settings โ†’ General โ†’ Taxes.

"Invalid cart" on the customer side

Prices changed between add-to-cart and checkout. The customer should refresh the cart and try again.

Next steps