Developer Docs

Integration Guide

This page shows exactly how developers should integrate Review Infra on client sites.
HomeDashboardDocs

Path A — Shopify

Use this when the client store is on Shopify and you want Review Infra to handle setup faster.
1. Create or select the store workspace in Review Infra
2. Connect Shopify from the dashboard
3. Sync products
4. Install widget
5. Test review flow from setup / orders page
For Shopify, developers usually do not need to manually paste the widget script if install is handled from the dashboard.

Path B — Custom / Headless

Use this when the client site is custom-built, headless, Hydrogen, Next.js, or any non-theme storefront.
1. Create a custom store workspace in Review Infra
2. Add products or import them
3. Paste the widget script on the product page
4. Send orders to the Orders API after purchase
5. Approve reviews in moderation if needed

1. Widget install

Add this script to the client’s product page template.
<script
  src="https://review-infra-api-production.up.railway.app/embed/widget.js?storeId=YOUR_STORE_ID">
</script>
The widget script is store-linked. No manual API key is needed for storefront display.
The widget displays approved reviews and also provides a built-in review submission form on the storefront.

2. Orders API — this starts automated review collection

The widget handles review display and manual review submission. The Orders API is what starts automated post-purchase review collection by queuing review requests after a real order is created.
POST https://review-infra-api-production.up.railway.app/orders
Content-Type: application/json

{
  "storeId": "YOUR_STORE_ID",
  "customerEmail": "customer@example.com",
  "customerName": "Customer Name",
  "productId": "YOUR_PRODUCT_ID",
  "orderRef": "ORDER-1001",
  "externalOrderId": "external-1001"
}
Call this from the client’s backend right after a real order is created.
If you do not call the Orders API, review requests will not be sent automatically.

3. What is productId?

Shopify: the widget can auto-detect productId on product pages, and synced products are usually mapped from Shopify product ID or legacy resource ID.
Custom store: use the product you created in Review Infra. This can be the internal product ID or mapped external ID based on your flow.
Rule: the same product identifier used for review display should also be used when sending orders.

4. Manual review submission

This is optional. Most integrations should rely on the order → nudge → review flow. The widget already includes a built-in review submission form for storefront use.
POST https://review-infra-api-production.up.railway.app/public-reviews/submit
Content-Type: application/json

{
  "apiKey": "YOUR_API_KEY",
  "productId": "YOUR_PRODUCT_ID",
  "rating": 5,
  "title": "Amazing",
  "text": "Loved it",
  "authorName": "Customer",
  "authorEmail": "customer@example.com"
}

5. 5-minute checklist for developers

Store workspace created
Correct store type selected (Shopify or Custom)
Products available in Review Infra
Widget visible on product page
Review form visible on product page
Orders API called after checkout
Review nudge appears in Nudges page
Review can be submitted and seen in Moderation

One-line explanation for developers

Widget displays and collects reviews on the storefront. Orders API starts automated post-purchase review collection.