PHP

cocart-community

A developer-first REST API to decouple WooCommerce on the frontend. Fast, secure, customizable, easy.

C

cocart-headless

Dernière activité 10 sept. 2026
cocart-headless/cocart-community

413

étoiles

69

forks

11

issues ouvertes

apicartcocartcocart-litedecouplede-commercefeature-pluginheadlessheadless-woocommerceheadless-wordpressrest-apishopping-cartwoocommercewoocommerce-apiwoocommerce-extensionwoocommerce-pluginwordpresswordpress-developmentwordpress-plugin

Ce README est souvent en anglais.

CoCart — Headless REST API for WooCommerce

Licence WordPress 6.7+ WooCommerce 9.0+ PHP 7.4+ GitHub Stars

CoCart — Community Edition

A developer-first REST API to decouple WooCommerce on the frontend.

Stop struggling with debugging cart sessions, broken cart flows and cache issues.

CoCart handles the hard parts so you can focus on your store, products and customers. Take advantage of our SDK's to quickly setup and integrate with Astro, Next.js, React, Vue, or any modern framework to build your headless storefront — gaining complete control over the customer experience, independent of WordPress.

Documentation · Try the REST API · Compare Editions · Upgrade · SDK


Important

v4.9 is the final major release of CoCart Community Edition. Going forward, Community Edition will receive security patches only — no new features or performance optimizations. New development continues in CoCart Starter & CoCart Plus and higher tiers. Community Edition remains a great way to evaluate CoCart before purchasing a license.

Why Developers Choose CoCart

  • ✅ Source of truth — Built on WooCommerce Data Stores and mirrors most WooCommerce hooks, ensuring broad compatibility from the start.
  • 🔐 Session management — Lightweight, cookie-less session keys stored in the database. Concurrency-safe.
  • 🔑 Flexible authentication — Log in via email, username, or phone. No admin API keys required. Optional JWT via official add-on.
  • 🌍 CORS control — First-party CORS so cross-domain frontends "just work".
  • 🛒 Real-time cart management — Validate items/coupons, calculate totals in a single call.
  • 🔎 Product search — Query by name, SKU, or ID — authenticated or not — with flexible filters.
  • 🧩 Extendable callbacks — Add your own logic with custom callbacks. No new endpoints needed.
  • 📊 Cart Insights — Monitor all cart sessions, including those nearing expiration or already expired.
  • 🛠 Works with Woo Checkout — Load any cart session into WooCommerce's native checkout.
  • 💸 Name Your Price — Support donation-based pricing with built-in flexibility.
  • 📦 Bulk Cart Requests — Combine multiple API calls into one for better performance.

Quick Start

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

See the full documentation for all available endpoints and create a sandbox to try it out.

If you use Raycast, install our documentation extension for quick easy access.

Install CoCart Docs Raycast extension

Official SDKs

Get started in your language of choice. Each SDK handles authentication, session management, and cart operations out of the box including currency formatting and timezone for dates.

SDK Language Repository Public
cocart-js TypeScript / JavaScript GitHub NPM
cocart-php PHP GitHub ---
cocart-python Python GitHub ---
cocart-go Go GitHub ---
cocart-flutter-sdk Flutter GitHub ---
cocart-swift-sdk Switft GitHub ---
cocart-kotlin Kotlin GitHub ---
cocart-react-native React Native GitHub ---

Want another language? Make a request

Developer Tools

  • CoCart OpenAPI Specs — OpenAPI definitions for CoCart REST API endpoints. Use them to generate client libraries, test with Yaak/Postman/Insomnia, or integrate with any tool that supports the OpenAPI standard.
  • CoCart Raycast - The source to our Raycast extension that lets you search CoCart API documentation quickly, copy URLs, or open them in your browser.
  • CoCart VSCode extension for Visual Studio Code adds snippets and auto-completion of functions, classes and hooks.
  • CoCart Cart Callback Example provides you an example of registering a callback that can be triggered when updating the cart.

Compare Editions

Feature Community (Free) Starter Plus
Cart API (add, update, remove items) ✅ ✅ ✅
Product search & filtering ✅ ✅ ✅
Session management ✅ ✅ ✅
Authentication (Basic, JWT) ✅ ✅ ✅
Cache configured ready ✅ ✅ ✅
Load Cart to Native Site ✅ ✅ ✅
Name Your Price Built In ✅ ✅ ✅
Coupon support — — ✅
Product Shipping Calculator — — ✅
Cart fees — — ✅
Advanced Batch Support — — ✅
Rate Limiting — — ✅
Account API — — ✅ (In Beta)
Checkout API — — ✅ (In Beta)
Integrations (20+) — — ✅ (In Beta)
Optimized for Performance — ✅ ✅
Full SDK Support — ✅ ✅
Forum support ✅ — —
Discord and Email Support — ✅ ✅
Plugin role back support — ✅ ✅
White-label ready — ✅ ✅

👉 View full pricing & features

CoCart Starter

CoCart Starter contains the same features and support as the Community Edition but is optimized for performance and provides improvements to support CoCart Plus and additional add-ons.

If you've evaluated CoCart Community Edition and need more powerful features and support for production, Basic is the natural next step.

👉 Get CoCart Starter

Upgrade to CoCart Plus

For more powerful features and enterprise-level control — upgrade to CoCart Plus and complete your headless store.

  • 🎫 Coupon Management — Reward customers and boost conversions.
  • 🚢 Shipping Options & Rate Calculation — Let customers choose from your available shipping methods.
  • 💰 Cart Fees — Add custom fees for any purpose (handling, rush, etc.).
  • 🥪 Advanced Batch API — Handle multiple cart actions in a single request.
  • 🕒 Rate Limiting — Prevent abuse and maintain high performance with granular API control.
  • 🧾 Checkout — Complete an order and take payment using any supported gateways by WooCommerce. (Coming Soon)
  • 💲 Subscription Support — Complete new subscriptions or renewals automatically or manually. (Coming Soon)

Add-ons

We also have add-ons that extend CoCart to enhance your development and your customers' shopping experience.

Add-on Repository WordPress.org Requirements
Rate Limiting - Control and prevent abuse from excessive calls. GitHub - CoCart Plus
JWT Authentication - Authenticate via a simple JWT Token. GitHub WordPress -

These add-ons of course come with support too.

Need Support?

Community Edition support is provided via our Discord community server. Priority support is available to paying customers.

Bug Reporting

Bug reports for CoCart Community Edition are welcomed in this repository on GitHub. Please note that GitHub is not a support forum, and that issues that aren't properly qualified as bugs will be closed.

Testimonials

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

Harald Schneider ⭐️⭐️⭐️⭐️⭐️

What can I say this thing has it all. It is the "Missing WooCommerce REST API plugin" without it I was managing users cart myself in weird and wonderful but hacky ways. NOT GOOD and so vulnerable. Then I stumbled upon CoCart and with the help of Seb I got it working how I needed it and he has been supporting me with even the smallest of queries. Really appreciate your work and continued support Seb.

Joel Pierre – JPPdesigns Web design & Development ⭐️⭐️⭐️⭐️⭐️

This plugin was critical to achieve my project of building a headless / decoupled WooCommerce store. I wanted to provide my clients with a CMS to manage their store, but wanted to build the front-end in React. I was able to fetch content over the WooCommerce REST API, but otherwise would not have been able to fetch the cart, and add & remove items if not for this plugin.

Thank you very much Sébastien for sharing this extension, you've saved me a lot of time.

Allan Pooley – Little and Big ⭐️⭐️⭐️⭐️⭐️

Thanks for doing such a 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.

MightyGroup – Rikard Kling ⭐️⭐️⭐️⭐️⭐️

See the wall of love for more testimonials. We'd also love to hear what you have to say. Share your thoughts and help others discover if CoCart is for them.

Get Involved

Do you like the idea of creating a headless store with WooCommerce? Got questions or feedback? We'd love to hear from you. Come join our community!

Credits

Website cocartapi.com  ·  GitHub @cocart-headless  ·  X/Twitter @cocartapi  ·  Facebook  ·  Instagram


CoCart API is developed and maintained by Sébastien Dumont. Founder of CoCart Headless, LLC.

Website sebastiendumont.com  ·  GitHub @seb86  ·  X/Twitter @sebd86

Projets similaires

A customizable, open-source ecommerce platform built on WordPress. Build any commerce solution you can imagine.

PHPautomatticecommerceecommerce-platform
Wwoocommerce
10,5 k étoiles10,7 k

WooCommerce REST API PHP Library

PHP
Wwoocommerce
545 étoiles158

Saleor Core: the high performance, composable, headless commerce API.

Pythoncartcheckoutcommerce
Ssaleor
23,4 k étoiles6,1 k