Welcome to the CoCart core repository on GitHub. Here you can browse the source code, look at open issues and keep track of development. We recommend all developers to follow the CoCart development blog to stay up to date about everything happening in the project. You can also follow @cocartapi on Twitter for the latest development updates.
If you are looking for documentation, head over here: https://cocartapi.com/docs/
👋 Looking to contribute to CoCart?
🫶 Show some appreciation by sponsoring.
Build modern headless stores with WooCommerce faster — with the REST API purpose-built for developers.
CoCart chose to support WooCommerce because it was missing a key component to decouple WooCommerce via the REST API efficiently. CoCart provides a flexible and efficient way to build cutting-edge stores with WooCommerce at its core.
If you’ve struggled to decouple WooCommerce, CoCart is your solution:
-
✅ Source of Truth
Built on WooCommerce’s native Data Stores API and mirrors Woo hooks. Broad compatibility from the start. -
🔐 Simple, Secure Sessions
Lightweight session keys. No cookies. Database-based session management built for headless. -
🔑 Easy Authentication
Log in with email, username, or phone. No admin API keys required.
JWT supported via official add-on. -
🌍 CORS-Controlled
Solve cross-domain issues with first-party CORS control. -
🛒 Real-Time Cart Management
Validate items, validate coupons, calculate totals — all in one API call. -
🔍 Efficient Product Search
Search by name, SKU, or ID — with or without authentication. Filter the results your customers query. -
🧩 Extendable Callbacks
Add your own logic with custom callbacks. No new endpoints needed. -
🛠️ Works with Woo Checkout
Prefer WooCommerce's checkout? Load any cart session into it easily. -
💸 Name Your Price
Support donation-based pricing with built-in flexibility. -
📦 Bulk Cart Requests
Combine multiple API calls into one for better performance.
For more power, performance, and enterprise-level control — upgrade to CoCart Plus.
Unlock features like:
-
🎫 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. -
📊 Cart Insights
Monitor active, expiring, and expired sessions.
Join thousands of developers and agencies building with CoCart — the REST API that takes WooCommerce further.
👉 Upgrade to CoCart Plus and build the future of commerce today.
We also have add-ons that extend CoCart to enhance your development and your customers shopping experience.
- CoCart - CORS enables support for CORS to allow CoCart to work across multiple domains.
- CoCart - Rate Limiting enables the rate limiting feature for CoCart Plus or higher.
- CoCart - JWT Authentication allows you to authenticate via a simple JWT Token.
- CoCart - Cart Enhanced enhances the data returned for the cart and the items added to it.
- and more add-ons in development.
These add-ons work with the core of CoCart already, and these add-ons of course come with support too.
- CoCart Beta Tester allows you to test with bleeding edge versions of CoCart core from the GitHub repo.
- CoCart VSCode extension for Visual Studio Code adds snippets and auto-completion of functions, classes and hooks.
- CoCart Product Support Boilerplate provides a basic boilerplate for supporting a different product type to add to the cart with validation including adding your own parameters.
- CoCart Cart Callback Example provides you an example of registering a callback that can be triggered when updating the cart.
We aim to provide regular support for the CoCart plugin via our Discord community server. Please understand that we do prioritize support for our paying customers.
Bug reports for CoCart are welcomed in the CoCart 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.
Please consider starring ✨ and sharing 👍 the project repo! This helps the project get known and grow with the community. If you like to help further CoCart's development, why not consider sponsoring.
Thank you! 🙏
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.
We have different channels at your disposal where you can find information about the CoCart project, discuss it and get involved:
- 📖 Docs: this is the place to learn how to use CoCart API. Get started!
- 👪 Community: use our Discord chat room to share any doubts, feedback and meet great people. This is your place too to share how are you planning to use CoCart!
- 🐞 GitHub: we use GitHub for bugs and pull requests, doubts are solved with the community.
- 🐦 Social media: a more informal place to interact with CoCart users, reach out to us on Twitter.
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! ❤️
CoCart API also welcomes contributions. There are many ways to support the project! If you don't know where to start, this guide might help >> How to contribute?
Website cocartapi.com · GitHub @co-cart · Twitter @cocartapi
CoCart API is developed and maintained by Sébastien Dumont. Founder of CoCart Headless, LLC.
Website sebastiendumont.com · GitHub @seb86 · Twitter @sebd86