Documentation · Quickstart
Shoprivet Developer Quickstart
Go from a new account to an embedded catalog widget, a hosted storefront, or your first public Storefront API checkout call.
1. Prerequisites and account setup
Sign up for a free Shoprivet account at shoprivet.io/app/signup. Every Free plan includes 1 store, up to 25 active products, 50 orders per month, 1 online payment gateway, 60 API requests per minute, and 100 MB of digital file storage.
For local development you need Node.js 20 or newer (if building a JavaScript framework storefront), curl or an HTTP client, and any website or HTML page if you want to test the catalog widget.
- Production API base URL: https://api.shoprivet.io
- Embeddable widget runtime: https://api.shoprivet.io/widget.js
- OpenAPI 3.0.3 schema: https://shoprivet.io/docs/openapi.json
2. Create a store, products, and categories
Create your first store from the dashboard or via POST /v1/stores using a server-side merchant API key. Note your store slug (for example, downtown-shop) for public Storefront API calls and your store ID (STORE_ID) for authenticated /v1 management endpoints.
Add products with prices, descriptions, images, inventory tracking (trackStock and stock), optional product variants, or digital files up to 50 MB per uploaded file (subject to plan storage quota).
curl "https://api.shoprivet.io/public/stores/downtown-shop"
curl "https://api.shoprivet.io/public/stores/downtown-shop/products?page=1&limit=24"
3. Configure checkout payment methods
Stores support Cash on delivery by default plus Stripe, Paystack, Flutterwave, Razorpay, and PayPal. Configure your chosen payment gateway inside the Store Settings -> Payments screen (or via POST /v1/stores/:storeId/payments from your backend).
Check enabled payment providers for any storefront at runtime using GET /public/stores/:slug/payment-methods. Note that Shoprivet uses Paddle exclusively for SaaS plan billing; Paddle is not supported for customer store checkouts.
4. Choose embed widget or headless REST API
If you want an instant product grid, shopping cart drawer, and checkout modal on any website, drop the two-line widget snippet into your HTML. If you are building a custom Next.js, React, Vue, or Astro frontend, create a guest cart via POST /public/stores/:slug/carts and check out with an idempotencyKey.
<div data-shoprivet="downtown-shop"></div>
<script src="https://api.shoprivet.io/widget.js" async></script>
5. Create a guest cart and test checkout
Public cart mutations require the scoped bearer credential returned by POST /public/stores/:slug/carts. After checkout returns an authorizationUrl, redirect the customer to complete payment, then call POST /public/stores/:slug/orders/:orderNumber/confirm with the orderAccessToken returned at checkout.
const API_BASE = 'https://api.shoprivet.io';
const slug = 'downtown-shop';
// 1. Create guest cart
const { credential } = await fetch(`${API_BASE}/public/stores/${slug}/carts`, {
method: 'POST',
credentials: 'omit',
}).then((r) => r.json());
const headers = { Authorization: `Bearer ${credential}`, 'Content-Type': 'application/json' };
// 2. Add item
await fetch(`${API_BASE}/public/stores/${slug}/carts/current/items`, {
method: 'POST',
headers,
credentials: 'omit',
body: JSON.stringify({ productId: 'PRODUCT_ID', quantity: 1 }),
});
// 3. Check out with a stable idempotencyKey per attempt
const checkout = await fetch(`${API_BASE}/public/stores/${slug}/carts/current/checkout`, {
method: 'POST',
headers,
credentials: 'omit',
body: JSON.stringify({
name: 'Ada Lovelace',
email: '[email protected]',
provider: 'cash_on_delivery',
idempotencyKey: crypto.randomUUID(),
}),
}).then((r) => r.json());
console.log(checkout.orderNumber, checkout.orderAccessToken);
