This is an info Alert.
x402 Logo
  • Product
    • Become Agent-Ready
      • Merchants
        Agentic Commerce — list your store across ChatGPT, Gemini, Claude & Perplexity
      • Publishers
        Monetize your content when AI agents read, cite, or train on it
      • SaaS Companies
        Treat AI agents as first-class customers with agent-priced checkout
    • Monetize
      • Monetize MCP Server
        Charge per call on any MCP server in 2 minutes
      • Monetize AI Agents
        Turn n8n, Zapier, Activepieces workflows into revenue
      • Agent Feed
        Pay-per-query access to licensed publisher content for your agents
  • Resources
    • xpay Ecosystem
      • xpay✦ Tools
        1,000+ pay-per-use tools for your AI agents
      • Agent-Ready SaaS Index
        25,481 SaaS scored on agent-buyability
      • SaaS Pricing Database
        Pricing pages indexed across 1,000+ categories
      • Shopify Apps Directory
        Every Shopify app, with its full review history
      • WooCommerce Plugins Directory
        Every WooCommerce plugin, scored on how well it is maintained
      • GitHub
        Open source repositories
    • Agent Building
      • Agent Frameworks
        AI frameworks for building multi-agent systems
      • x402 Integration
        AI frameworks with x402 payment integration
      • Networks
        Blockchain networks supporting x402
    • Company
      • About xpay✦
        Our mission, products, and protocols
      • Blog
        Latest insights and updates
      • Docs
        Complete xpay documentation
  • Pricing
  • Blog
  • Docs
Get Started
  1. xpay✦ Commerce

  2. Directory

  3. WooCommerce plugins

  4. CoCart – Headless REST API for WooCommerce

CoCart – Headless REST API for WooCommerce

Ship your headless WooCommerce storefront faster. CoCart is the REST API built for Next.js, React, Vue, and any modern frontend — developer-first.

1K+ active installs
4.9
(21 ratings)
Has a paid tier
View on WordPress.orgSupport forum
Will this break my store?

What the WordPress.org registry says about keeping CoCart – Headless REST API for WooCommerce running.

WordPress compatibility
Tested to 7.0.2
Tested against the WordPress branch in use today.
Last updated
13 days ago
At least 1.9 releases a year since launch. WordPress.org only lists versions still available for download, so the real number may be higher.
Requires PHP
8.2
Your host must be running at least this version.
Requires WordPress
6.7
Requires other plugins
woocommerce
These must be installed and active first.
Contributors
2

1K+ active installsWordPress.org reports installs in bands, not exact counts.
Maintenance & trust

Scored on how CoCart – Headless REST API for WooCommerce is looked after — not on how many stores run it.

98

out of 100
Well maintainedSome ratings or support history.

Maintenance
35 / 35
Updated 12 days ago.
WordPress compatibility
20 / 20
Tested to WP 7.0.2 (current).
Support responsiveness
Not enough data
Only 0 support thread(s) — not enough to judge.
Merchant satisfaction
13 / 15
4.9/5 across 21 rating(s).
Listing transparency
10 / 10
Provides: screenshots, description, homepage
1 of 5 measures had too little evidence to score. They are left out of the total rather than counted as zero — otherwise a plugin would be marked down for being small rather than for being poorly kept.Measured 2026-08-01 from the WordPress.org plugin registry.
Ratings

4.9

21 ratings
5★20
4★0
3★0
2★1
1★0
Every rating WordPress.org holds for this plugin, not a sample. Written reviews live in the plugin's WordPress.org reviews forum.

You’ve chosen WooCommerce for your store. Now you want a modern frontend — React, Next.js, Astro, Vue — without being locked into WordPress themes. That’s exactly what CoCart is built for.

CoCart gives WooCommerce a proper frontend REST API: cookie-less session management built for stateless frontends, authentication that makes sense, and CORS support built-in. Cart sessions, authentication, and product data. Scale up when you’re ready.

In active development since 2018, with a ★4.9/5 rating from the developers who build headless stores with it every day.

🚀 Make your first API call in 2 minutes

Install CoCart and you’re immediately ready to call the API — no setup required:

curl -X POST https://your-store.com/wp-json/cocart/v2/cart/add-item \
  -H "Content-Type: application/json" \
  -d '{"id": "123", "quantity": 1}'

Want to explore before installing? Try a free sandbox →

See the full API reference →

💬 Loved by 1,000+ developers worldwide

Rated ★★★★★ 4.9/5 on WordPress.org.

★★★★★

“An excellent plugin, which makes building a headless WooCommerce experience a breeze. Easy to use, nearly zero setup time.” — Harald Schneider

★★★★★

“This plugin works great out of the box for adding products to the cart via API. The code is solid and functionality is as expected, thanks Sebastien!” — Scott Bolinger, Creator of Holler Box

★★★★★

“Thanks for doing such great work with this! Works exactly as expected and CoCart seems to have a nice community around it. The founder seems really devoted and that’s one of the key things for a plugin like this to live on and get the right updates in the future. We just got ourselves the lifetime subscription.” — Mighty Group Agency

See our full wall of love for more developer testimonials.

Why CoCart?

WooCommerce’s Store API can be used headless, but it was designed for the Gutenberg block editor ecosystem. Its session model relies on nonces passed via response headers — suited for anonymous single-session shoppers, but the nonce is tied to WordPress’s nonce lifecycle and less straightforward to persist across sessions or devices.

CoCart is purpose-built for headless from day one: cart sessions identified by a persistent key — no nonces, no cookies — a single unified endpoint set for both product and cart data, and authentication for customers that supports any shop requirement.

Features

🚀 Session management that works

  • 🔐 Cookie-less sessions — database-stored, built for concurrent requests and stateless frontends
  • 👤 Guest customer support — full cart session support for unauthenticated shoppers, no login required
  • 🔄 Load any session into checkout — hand off to WooCommerce’s native checkout with any payment gateway

🛒 Essential cart operations

  • ✅ Add, update, and remove items via simple POST/PUT/DELETE requests
  • 🔎 Product search — query by name, SKU, or ID, authenticated or not, with flexible filtering
  • 💸 Name Your Price support — donation-based and flexible pricing built in
  • 📦 Bulk cart requests — combine multiple operations into a single API call

💻 Developer experience, done right

  • 🔑 Flexible authentication — email, username, or phone login; no admin API keys to manage
  • 🌍 CORS support built in — first-party CORS handling; your frontend connects without configuration hell
  • 🧩 180+ filters — customize every response, add logic without writing new routes
  • 📊 Cart insights — monitor active, expiring, and expired sessions from the dashboard
  • 🛠 Works with your existing stack — built on WooCommerce Data Stores with familiar hooks for broad plugin compatibility

🎯 Battle-tested

  • Tested with every major WooCommerce release
  • Multisite compatible

Who builds with CoCart?

Frontend developers shipping storefronts in Next.js, React, Vue, Nuxt, Astro, Svelte, or Remix — keep WooCommerce as the commerce engine and own the entire frontend experience, from server components to fully static builds.

Mobile app developers building shopping apps in React Native, Flutter, Swift, or Kotlin — the same cart key works across devices, so a customer can start a cart on their phone and finish on the web.

Agencies delivering high-performance client storefronts — reuse one proven commerce backend across projects while every client gets a custom frontend, free of WordPress theme constraints.

Product teams going beyond the browser — progressive web apps with persistent carts, in-store kiosks, point-of-sale screens, even chat and voice commerce. Anywhere a customer can shop, CoCart can serve the cart.

Free vs. CoCart Plus

The free community version handles everything a headless cart needs: sessions, auth, CORS, cart operations, and product queries. It is actively maintained with security updates.

New features ship in CoCart Plus. When you’re ready to build a complete headless storefront — with coupons, shipping, fees, rate limiting, and checkout — Plus has you covered:

  • 🎫 Coupon Management — apply discounts and promo codes, boost conversions
  • 🚢 Shipping Calculations — real-time rates and method selection
  • 💰 Cart Fees — handling fees, rush charges, and custom pricing logic
  • 🥪 Advanced Batch API — multiple cart operations in a single request
  • 🕒 Rate Limiting — protect your API from abuse under load
  • 🧾 Checkout — complete orders with any WooCommerce-supported gateway (coming soon)
  • 💲 Subscription Support — new subscriptions and renewals (coming soon)

View CoCart Plus features and pricing →

👍 Add-ons

Free add-ons that extend the core:

  • CoCart – Rate Limiting — add rate limiting to CoCart Plus
  • CoCart – JWT Authentication — authenticate via JWT token

SDKs & Tools

Official SDKs — authentication, session management, and cart operations out of the box:

  • cocart-js (TypeScript/JavaScript) — GitHub
  • cocart-php (PHP) — GitHub
  • cocart-python (Python) — GitHub
  • cocart-go (Go) — GitHub

More are also in development and look forward to your feedback.

Developer tools:

  • CoCart OpenAPI Specs — generate client libraries or test with Postman/Insomnia/Yaak
  • CoCart for VS Code — snippets and autocompletion for functions, classes, and hooks
  • Raycast Extension — access CoCart docs without leaving your keyboard
  • Cart Callback Example — register custom callbacks triggered on cart updates

Need Support?

Free users: Post in the WordPress support forum or join the CoCart Discord community — a growing group of developers, agencies, and shop owners building headless stores together.

CoCart Plus customers receive priority support with faster response times.

Join the community on Discord →

More Information

  • Website
  • Documentation
  • Follow on X/Twitter, GitHub, Facebook, Instagram

💯 Credits

Developed and maintained by Sébastien Dumont
Founder of CoCart Headless, LLC.

Contributors & Developers

You can help translate “CoCart” into your language.

INTERESTED IN DEVELOPMENT?

Browse the code on GitHub, or follow the CoCart development blog for the latest development updates. You can also follow @cocartapi on Twitter to stay up to date about everything happening with CoCart.

Please share your experience

We’d love to hear what you have to say. Share your experience and help others discover CoCart. It helps to keep the plugin going strong, and is greatly appreciated.

Who is CoCart for?

Developers building headless or decoupled WooCommerce storefronts. If you can make HTTP requests and read JSON, you’re ready. No WordPress development experience required — CoCart abstracts the complexity and gives you clean, predictable API responses. Perfect for:

  • Frontend developers building with React, Next.js, Astro, Vue, or any modern framework
  • Agencies creating high-performance client storefronts
  • Mobile app developers who need a reliable eCommerce API

How do I get started?

Install WooCommerce and configure your store, then install and activate CoCart. You’re immediately ready to call the API — no additional setup required. Check the installation section for requirements, then follow the API reference to start building.

What happens to the free community version if I don’t upgrade?

Nothing. The free community stays fully functional. It covers sessions, authentication, CORS, cart operations, and product queries — everything you need to build a working headless cart. CoCart Plus adds advanced features like coupons, shipping, fees, and rate limiting for when you need them.

Is my store or customer data sent to CoCart’s servers?

No. CoCart runs entirely on your WordPress server. No customer data, cart contents, or store information is ever sent to CoCart’s servers. The plugin collects no analytics without your consent. Full privacy policy →

Will my existing WooCommerce plugins still work?

Plugins that modify backend functionality — payment gateways, shipping, tax, inventory — continue to work. Plugins that only modify the PHP frontend (themes, shortcodes, widgets) won’t apply to the REST API layer, which is expected in a headless setup.

Why use CoCart instead of WooCommerce’s Store API?

WooCommerce’s Store API can be used headless, but it was designed for the Gutenberg block editor ecosystem. Its session model relies on nonces passed via response headers — suited for anonymous single-session shoppers, but tied to WordPress’s nonce lifecycle and less straightforward to persist across sessions or devices. CoCart is purpose-built for headless: cart sessions identified by a persistent key and authentication that supports any shop requirement.

Why does CoCart use a custom session handler?

Headless storefronts are stateless by nature — there’s no browser session to rely on, and concurrent requests are common. CoCart’s session handler is cookie-less, database-stored, and safe for concurrent requests, with full support for both guest and authenticated customers from day one.

Can I run WordPress on one domain and my storefront on another?

Yes — that’s the primary use case CoCart is built for. Enable CORS via the free CORS add-on or manually via the filter documented here.

Can I call other WordPress or WooCommerce APIs alongside CoCart?

Yes. CoCart doesn’t block or replace any other API. Once authenticated, your frontend can access CoCart endpoints, WooCommerce endpoints, and any custom endpoints you’ve built — all at the same time.

Can CoCart support SSO?

CoCart does not implement SSO itself — it authenticates customers against WordPress user accounts using Basic Auth or JWT (via add-on). It does not natively speak SAML, OAuth 2.0, or OIDC.

That said, CoCart can work alongside SSO in a headless setup. The typical pattern is:

  1. Your identity provider (Google, Okta, Auth0, etc.) authenticates the user via your frontend.
  2. A WordPress SSO plugin (e.g. one handling OAuth 2.0 or SAML) creates or matches a WordPress user account for that identity.
  3. Your frontend then authenticates with CoCart using Basic Auth or JWT as that WordPress user.

The SSO layer handles identity; CoCart handles the commerce session from that point on. Whether this works smoothly depends on how your chosen SSO plugin manages WordPress user creation and session state — that part is outside CoCart’s scope.

Does CoCart work on multisite?

Yes. Install and activate CoCart on each site where you want to use it.

Can I change the format of API responses?

Yes — there are 180+ filters available to customize responses, add fields, or remove data you don’t need.

Is “WooCommerce Shipping and Tax” plugin supported?

No — it restricts tax calculation to WooCommerce Blocks and Jetpack only. We don’t recommend it for headless setups. TaxJar for WooCommerce (v3.2.5+) is supported.

Does CoCart work with caching plugins like LiteSpeed or WP Rocket?

Yes. CoCart automatically excludes its API endpoints from page caching, so caching plugins won’t interfere with cart sessions or API responses. LiteSpeed Cache is explicitly supported out of the box. Though, some hosts may require manual configuration to exclude CoCart API endpoints.

How are cart sessions identified without cookies?

Each cart is assigned a unique cart key, which your frontend passes as a request header or query parameter on subsequent API calls. This makes sessions fully stateless and safe for concurrent requests — no cookies, no session conflicts. See the session documentation for implementation details.

Is there a hosted version, or does it run on my server?

CoCart runs entirely on your WordPress server — there’s no external service, no cloud dependency, and no data leaving your environment. You own your stack.

Where can I report bugs?

On the CoCart GitHub repository or in the #bug-report channel of the Discord community. Search first to avoid duplicates.

Where can I find more answers?

Check the full FAQ on cocartapi.com or browse the documentation.

Categories
CartWorkflow automation
Plugin details
Version4.9.1
Last updated2026-07-20 6:05pm GMT
Added2018-02-26
Requires WordPress6.7
Tested up to7.0.2
Requires PHP8.2

Tags on WordPress.org
cart
decoupled
headless
rest-api
woocommerce
Alternatives
Other plugins in the same categories.
WooCommerce
7M+ installs
4.5(4,808)
Sliding Cart for WooCommerce by FunnelKit – Skip Cart & Reach WooCommerce Checkout Faster
30K+ installs
5.0(108)
XT Ajax Add To Cart for WooCommerce
1K+ installs
4.8(30)
WPC Fly Cart for WooCommerce
10K+ installs
4.7(61)
WP Menu Cart
7K+ installs
4.8(23)
XT Floating Cart for WooCommerce
4K+ installs
4.6(148)
x402 Logo

The agent-readiness stack for the AI shopping era — helping merchants, publishers and SaaS companies get discovered, cited and transacted with by ChatGPT, Perplexity, Claude, Gemini and the custom shopping agents underneath them.

CompanyAgentically Inc. (d/b/a xpay✦)1875 Mission St, Ste 103San Francisco, CA 94103, United Stateslegal@xpay.sh · privacy@xpay.sh
or ask your AI app
Company
About xpayAgency PartnersGitHubDiscordllms.txt
DevelopersDocumentationAPI ReferenceSDKs & LibrariesQuickstart GuideOpenAPI Spec
Stay Updated
Occasional product updates and agent-readiness playbooks from xpay (Agentically Inc.) — typically a couple of emails a month. Double opt-in: we email you a link to confirm before sending anything, and every email has one-click unsubscribe.
Social
  • For Publishers
    • News
    • Finance
    • Dev / Tech
    • Travel
    • View all verticals
  • Agent Feed
    • AI Search Engines
    • RAG Builders
    • Browser Agents
    • Vertical Research
    • Browse full catalog
  • Agent-Ready Index
    • SaaS Pricing Database
    • Agent-Ready SaaS Index
    • Verified band
    • AI & ML
    • Sales & CRM
  • Products
    • Pricing Widget
    • Monetize MCP Server
    • Paywall
    • Smart Proxy
    • Monetize AI Agents
    • xpay x402 Facilitator
  • Agentic Economy
    • Timeline
    • Resources
    • Manifesto
    • Stack
  • Agentic Commerce
    • Get listed
    • ChatGPT Ads
    • How ChatGPT Ads work
    • ChatGPT Ads · Apparel
    • ChatGPT Ads · Health & Beauty
    • xpay Listings · Amazon + Google
    • Pricing
    • Free audit
    • Shopify
    • WooCommerce
    • Apparel & Accessories
    • Health & Beauty
    • Overview
  • Commerce Index
    • Shopify apps directory
    • Agentic Commerce Ready Index
    • Methodology
    • Pet brands · WooCommerce
    • Pet brands · Shopify
  • Marketplace
    • 🛍️ xpay.deals — agentic storefront for deals
  • Protocols
    • Overview
    • x402
    • MPP
    • UCP
    • ACP
    • AP2
    • TAP
    • A2A
  • Agent Frameworks
    • Overview
    • LangChain
    • CrewAI
    • Claude MCP
    • AutoGPT
    • LangChain vs Mastra
    • LangGraph vs Pydantic AI
  • Company
    • About xpay
    • Blog
    • Docs
    • GitHub
  • Free prompts
    • Ecommerce prompts
    • Email marketing prompts
    • Product description prompts
    • Facebook ad prompts
    • Skincare prompts
    • Supplement prompts
    • Wine prompts
    • Electronics prompts

© 2025 Agentically Inc. All rights reserved.
Privacy PolicyTerms of UseAcceptable Use Policy