Live pricing with SSR or widget.js
Static Astro builds snapshot catalog data at build time; use Astro SSR adapters or widget.js when stock and prices change frequently.
Framework Integration · Astro
Keep your Astro pages near zero JavaScript for search engines and readers while pulling real products from Shoprivet and hydrating only the shopping cart interaction.
Fetch GET /public/stores/{slug}/products in Astro component frontmatter to output pure server or static HTML, then embed widget.js or wire a lightweight client cart script to /public/stores/{slug}/carts.
Practical implementation
Query GET /public/stores/:slug/products during SSR or build time so product names, descriptions, and prices render cleanly in initial HTML.
Use widget.js for zero-boilerplate cart drawers or attach small vanilla JS / Astro island handlers for custom Add to Cart buttons.
Use POST /public/stores/:slug/orders/:orderNumber/confirm on your order confirmation page.
Astro frontmatter catalog fetch
---
const res = await fetch("https://api.shoprivet.io/public/stores/downtown-shop/products");
const { products = [] } = res.ok ? await res.json() : { products: [] };
---
Requirements, pricing & limits
Static Astro builds snapshot catalog data at build time; use Astro SSR adapters or widget.js when stock and prices change frequently.
Avoid running separate cart or payment verification servers.
Accept Stripe, Paystack, Flutterwave, Razorpay, PayPal, and Cash on delivery.
Reference /docs/openapi.json in Cursor when building custom Astro islands.
Direct answers
Related documentation & solutions
Start free at $0/month
Create a store in minutes, embed a catalog on your existing site, or call our public Storefront and /v1 APIs.
Create your free store