Marketplace

Marketplace

The PayWeave Marketplace is where your paid endpoints become discoverable to agents and humans. Every App route registered through payweave.route(), every Gateway endpoint, every Function, and every paid File is a potential listing. Publishing is semi-automatic: your SDK registers routes as they execute, the platform pulls them when you click Sync endpoints, and the marketplace surfaces them through a single discovery API.

How a listing happens

StepActorWhat happens
1. RegisterYour server (SDK)payweave.route() adds the route to an in-memory manifest keyed by appId.
2. ExposeYour server (SDK)payweave.mountSync(app) mounts GET /_payweave/sync returning the manifest.
3. PullPlatform dashboardClicking Sync endpoints calls your /_payweave/sync, writes rows to endpoint_manifest.
4. PublishPlatform APIRows with discoverable=true + price are exposed via /api/discovery/skills.
5. DiscoverMarketplace + agentsMarketplace UI, Skills API, MCP server, LLMs.txt, and AI Plugin all read the same feed.

What gets published

Only routes created with payweave.route() are registered in the manifest. Routes using the lower-level payweave.charge() middleware are not published — they'll accept payments but stay off the marketplace.

Each listing inherits the following fields from your route definition:

FieldSourceUsed where
nameroute options → name (fallback: description)Marketplace title, MCP tool name, skill.md header.
descriptionroute options → descriptionMarketplace body, 402 challenge meta, skill.md body.
priceUsdroute options → price (string or function)Marketplace price column, 402 amount, analytics.
httpMethod, httpPathroute() argumentsMarketplace endpoint column, OpenAPI spec.
inputSchema / outputSchemaroute options (Zod or JSON Schema)OpenAPI spec, MCP input schema, Skills input/output, playground.
discoveryConfigroute options → exampleInput, exampleOutputPlayground default payload, Skills example section.

Making an app discoverable

Discoverability is a per-app toggle stored on the apps table (column discoverable, default true). You control it from the dashboard on an app's Settings tab — toggle it off to keep an app's routes private even after syncing. Individual endpoints inherit the flag from their parent app.

Publishing a listing end-to-end

This is the minimal flow — define a route, mount sync, push Sync from the dashboard. Within seconds the endpoint is live on the marketplace.

TypeScript
import { Hono } from 'hono';
import { Payweave } from '@payweave/hono';
import { z } from 'zod';

const app = new Hono();
const payweave = new Payweave(
  process.env.PAYWEAVE_APP_ID!,
  process.env.PAYWEAVE_APP_SECRET!
);

payweave.route(app, 'post', '/api/summarize', {
  name: 'Text Summarizer',
  description: 'Summarize any text to 3 bullet points.',
  price: '0.002',
  inputSchema: z.object({ text: z.string().min(1) }),
  outputSchema: z.object({ bullets: z.array(z.string()) }),
  handler: async (_c, body) => ({
    bullets: summarize(body.text),
  }),
});

// Exposes GET /_payweave/sync so the platform can pull your manifest.
payweave.mountSync(app);

export default app;

After deploy:

1. Set your app's domain in Settings → Domain. This is the base URL the platform calls /_payweave/sync on.

2. Open Apps → [your app] → Endpoints and click Sync endpoints. Your routes appear in the table.

3. Visit the marketplace — your endpoint is listed with its price, method, schemas, and a playground.

Consuming the marketplace feed

The marketplace UI, MCP server, AI Plugin, and Skills API all read the same unified discovery endpoint. Agents can query it directly:

Terminal
curl https://api.payweave.app/api/discovery/skills

The response is a DiscoveryItem[] array unioning Apps, Gateways, Functions, and Files. See the Discovery → Skills API section for the full shape and filter parameters.

Re-syncing & updates

The sync pull is idempotent — routes are upserted by (appId, httpMethod, httpPath). Change a price or description, redeploy, click Sync endpoints again, and the marketplace reflects the update within seconds. Routes removed from your code disappear from the manifest on the next sync.

The platform authenticates its sync request to your server with an HMAC header over the app secret. If your mountSync() call is behind a WAF or additional auth, whitelist the platform's sync origin so the pull succeeds.
Gateways, Functions, and Files publish automatically on save — they don't need a manual Sync step. Only Apps (self-hosted SDK routes) require the sync button because the platform can't watch your code.