OCP-enabled

OCP Next.js Store

A Next.js 15 example demonstrating how to serve an Open Commerce Protocol manifest from an App Router route handler running on the edge.

What this example shows

How it's wired up

next.config.ts rewrites /.well-known/ocp.json to /api/ocp/manifest, which is implemented in src/app/api/ocp/manifest/route.ts. That route returns an OCPManifest describing the merchant, capabilities (catalog, search, cart, redirect checkout), and shipping regions.

An agent discovering this store fetches the manifest first, reads the capabilities, then calls the endpoints it advertises.

Live manifest

Fetched client-side from /.well-known/ocp.json:

Loading…