ORBCART DOCUMENTATION
OrbCart
OrbCart runs the purchase, from Cart to Order, and asks your systems for prices and stock. What it does, what it leaves to you and where to start.
OrbCart is the transaction layer of a shop: Cart, checkout, tax, shipping, payment and Order. It has no catalog. Your products, prices and stock stay in the systems that own them, and OrbCart asks those systems whenever a buyer needs a binding answer.
A whole purchase is four calls. shipTo is the buyer's address and payment is the card field on your page:
import { createCommerce } from "@orbcart/client";
const commerce = createCommerce({ url: "http://localhost:8787", key: "pk_test_..." });
const cart = await commerce.cart();
await cart.add("BACKPACK-30-GREEN");
const quote = await cart.quote({ shipTo, contact: { email: "anna@example.com" } });
const result = await quote.pay({ payment });When the card goes through, result.status is "ordered". The quickstart runs these lines against a complete example shop in about ten minutes.
What OrbCart does
- Signs the price. The buyer pays exactly the Quote they agreed to, or sees the new one first. A Quote expires after at most 30 minutes.
- Takes the payment. Stripe, Adyen, Mollie, PAYONE, PayPal and Amazon Pay sit behind one configuration, with express checkout. A provider timeout is
unknownand resolved by asking again, never a double charge. - Prices the delivery and the tax. Shipping rules per country, EU VAT for all 27 member states, discounts and gift cards.
- Hands over the Order. Your ERP gets every paid Order exactly once, and your systems hear what happened through signed Order events.
- Serves AI agents through the same door. An agent buys for a shopper over UCP, under the rules of your storefront.
What OrbCart leaves to you
| OrbCart does not | Who does |
|---|---|
| Hold products, prices or stock | Your systems, through the offers contract, or OrbCatalog. |
| Render the shop | Your storefront, in any framework. A React checkout and an order page are included. |
| Send emails | Your systems. OrbCart says which email is due. |
| Run on someone else's servers | You do: a Worker in your own Cloudflare account. See deployment. |
What makes OrbCart different compares this with shop platforms, headless suites and a build of your own, and says when something else fits better.
Change what you need
Everything in OrbCart changes in one of three ways, from shallow to deep. Extend OrbCart maps every extension point.
| Depth | You | Example |
|---|---|---|
| Configure | Set values per market in the Channel. | Shipping rules, discounts, legal texts, payment methods. |
| Compose | Arrange and restyle the parts of the checkout. | A checkout with a page per step. |
| Replace | Answer a contract with your own code. | Prices and stock from your ERP. |
With OrbCatalog
OrbCart needs none of its siblings. If you run OrbCatalog, the catalog answers the offers and inventory contracts for you, with no code in your Worker. Connect the products shows the configuration.
Next steps
| You want to | Read |
|---|---|
| See it run | Quickstart |
| Understand the model | Concepts, then How it works |
| Build the storefront side | Carts |
| Connect your ERP or pricing service | Offers |
| Copy a complete example | Recipes |
| Know what works today | Project status |