Manage your product catalog
Products and prices are the building blocks of every order. A product describes what you're selling—name, category, tax code, and custom metadata. A price attaches a monetary amount and currency to a product. This guide walks through creating and maintaining your catalog, controlling product visibility through the publish/unpublish/archive lifecycle, and attaching catalog items to orders at checkout.
Prerequisites
- A Commerce API key configured in your environment
- Basic understanding of orders and how line items work
Create a product
A product is a catalog entry. It doesn't have a price on its own—you attach one or more prices separately. This separation lets you update pricing without touching the product record and support multiple currencies or billing intervals on a single item.
Create product
curl https://api.zebo.dev/products/create \
-H "Authorization: Bearer $SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Premium Tailoring",
"about": "Bespoke suit tailoring with two fittings",
"category": "services",
"type": "service",
"tax_code": "txcd_20030000"
}'
The response includes the product ID (pr_…). Store this—you'll need it when creating prices and referencing the product in orders.
Attach a price
A price binds a monetary amount and currency to a product. You can attach multiple prices to the same product—useful for multi-currency stores or tiered billing (monthly vs annual).
Create price
curl https://api.zebo.dev/prices/create \
-H "Authorization: Bearer $SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"product_id": "pr_ZLxM9pQ4wRsN7jKv2cY1tD8hBgFnAo3i",
"amount": 85000,
"currency": "ghs",
"label": "Standard"
}'
Amounts are always in the smallest currency unit—pesewas for GHS, cents for USD, kobo for NGN. 85000 pesewas = GHS 850.00.
Publish and unpublish products
Products start in an unpublished state. Publish them when they're ready to appear in your storefront or be selected during checkout. Unpublish to hide them temporarily without losing the product record or its associated prices.
Publish product
curl https://api.zebo.dev/products/publish \
-H "Authorization: Bearer $SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"product_id": "pr_ZLxM9pQ4wRsN7jKv2cY1tD8hBgFnAo3i"}'
To hide a product without archiving it, call Unpublish a product with the same request shape. The product reverts to unpublished status and can be republished at any time.
Archive a product
Archiving is permanent removal from active catalog management. Archive products you'll never sell again—discontinued items, seasonal products that have run their course, or test entries you want to clean up. Archived products cannot be ordered and won't appear in catalog listings.
Archive product
curl https://api.zebo.dev/products/archive \
-H "Authorization: Bearer $SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"product_id": "pr_ZLxM9pQ4wRsN7jKv2cY1tD8hBgFnAo3i"}'
Archiving a product does not affect past orders that reference it. Historical line items remain intact for reconciliation and customer service purposes.
Related resources
- Products API — Full reference for create, lookup, update, publish, unpublish, and archive
- Prices API — Complete parameter reference for prices
- Accept a payment — How to include catalog products in order line items