co cart

Build modern headless stores with WooCommerce faster — with the REST API purpose-built for developers.

387
67
PHP

CoCart API - Core

Licence

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.

Description

Build modern headless stores with WooCommerce faster — with the REST API purpose-built for developers.

Want to try it out?

Why our API makes sense

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 WordPress at its core.

🔧 Built to Solve Real Headless Challenges

If your finding it hard to decouple WooCommerce from WordPress due to hitting roadblocks. CoCart can help by providing all the essential features you need to start building a headless eCommerce experience.

  • 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, apply 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 Architecture
    Add your own logic with custom callbacks. No new endpoints needed.

  • 📊 Cart Insights
    Monitor active, expiring, and expired sessions.

  • 🛠️ 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.

💼 Upgrade to CoCart Plus

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.

🔓 Ready to Go Headless?

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.

👍 Add-ons to further enhance CoCart

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

They work with the core of CoCart already, and these add-ons of course come with support too.

🧰 Developer Tools

  • CoCart Beta Tester allows you to test with bleeding edge versions of CoCart from the GitHub repo.
  • CoCart VSCode extension for Visual Studio Code adds snippets and auto-completion of functions, classes and hooks.
  • CoCart Carts in Session allows you to view all the carts in session via the WordPress admin.
  • 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.

💜 Need Support?

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 Reporting

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.

Support CoCart

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! 🙏

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.


CoCart Channels

We have different channels at your disposal where you can find information about the CoCart project, discuss it and get involved:

Twitter: cocartapi CoCart GitHub Stars

  • 📖 Docs: this is the place to learn how to use CoCart API. Get started!
  • 🧰 Resources: this is the hub of all CoCart resources to help you build a headless store. Get resources!
  • 👪 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.

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! ❤️

CoCart 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?


Credits

Website cocartapi.com  · 
GitHub @co-cart  · 
Twitter @cocartapi


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

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