This guide will walk you through the basics and help you start building custom functionality inside your cart drawer. 👉 View Full UpCart Public API Documentation
Overview
The Public API is a collection of JavaScript functions and event listeners that let you:- React to cart changes — detect when items are added, removed, or updated.
- Trigger actions — such as opening or closing the cart programmatically.
- Build custom features — inject your own logic or UI components directly inside the cart drawer.
What You Need to Get Started
Before using UpCart’s API, make sure you have:- Access to UpCart in your Shopify store
Ensure UpCart is installed and active in your store. - A basic understanding of JavaScript
Many customizations use pre-written snippets, but knowing basic JavaScript helps if you want to go beyond the basics.
Adding Your First UpCart API Script
You can start using the API right from your UpCart editor:- Go to UpCart Editor → Settings → Custom HTML → Scripts (before load)
- Paste in your script — for example:
- Save your changes, then test it in your store:
- Open Dev Tools (
F12orCtrl + Shift + Jon Windows,Cmd + Option + Jon Mac) - Add a product to your cart
- Check the Console tab for the message:
"You just added [product title] to your cart!"
Start Customizing Your Cart
Now that you’re set up, you can use the API to do all sorts of cool things — like automatically opening the cart when items are added, updating custom widgets, or sending analytics events. For full function references and examples, check out the UpCart Public API Documentation.More Resources
- 🧩 API FAQ — Troubleshooting tips and common questions
- ⚙️ Common Uses for UpCart API — Popular code examples and templates
- 💡 Customization Docs — Pre-written scripts to help you get started fast
- 🛍️ Shopify’s Cart API Documentation — Learn how Shopify handles cart data behind the scenes
- 👩💻 Need advanced customizations? Consider hiring a Shopify Expert for more complex integrations.

