View as Markdown

Authorize · Guide

Be findable by agents

Use this to publish your business's discovery profile: one signed document that tells any buyer agent that you accept Provenance approvals, the amount above which a person approves, the payment rails you take and which agent sells for you. Provenance serves it for you, so nothing has to change on your site.

Before you begin: verify one of your domains, either a store origin (List or unlist your store) or a selling agent's origin (Sell to agents).

1. Choose what the profile says

Open Settings → Store → Discovery in the console, or send PUT /v1/authorize/settings/discovery. The profile holds only what you choose here, and never people, prices or volumes.

publishedboolean
Publish the profile. Needs a verified domain.
namestring
The name agents see. Blank uses your branding name.
railsstring[]
The rails you accept: x402 (x402 v2), acp, ap2 (maps to AP2 0.2) and checkout.
rulesobject
person_required_over (orders above it need a person's approval) and currency.
network_mandatesboolean
You accept people's network permissions.
categoriesstring[]
Slugs such as data or office_supplies, used by search.
sellingobject[]
Your selling agents: agent_id, optional endpoints (a2a, mcp, offers) and categories. Each must be selling, with a verified origin and an active key.
curl -s -X PUT $PROVENANCE_API/v1/authorize/settings/discovery \
  -H "Authorization: Bearer $PROVENANCE_KEY" -H "Content-Type: application/json" \
  -d '{ "published": true, "rails": ["x402", "acp", "ap2", "checkout"], "rules": { "person_required_over": 1000, "currency": "USD" },
        "categories": ["data"], "selling": [{ "agent_id": "agt_01JDSAMPLE0TIDEPOOL0SALES00", "endpoints": { "a2a": "https://agents.saltmarsh.example/a2a" }, "categories": ["data", "reports"] }] }'

The response carries the signed profile, its profile_url and the status of each verified domain:

{
  "object": "discovery_settings",
  "id": "biz_01JDSAMPLE0SALTMARSH0DATA00",
  "published": true,
  "verified_origins": ["https://agents.saltmarsh.example", "https://saltmarsh.example"],
  "profile_url": "https://api.provenanceauth.com/v1/public/businesses/biz_01JDSAMPLE0SALTMARSH0DATA00/profile",
  "serving": []
}

Every change signs the profile again and raises its revision. A revoked agent key, or an agent whose origin check fails, drops out of the profile at once.

2. Check the hosted profile

Anyone can read it, with no key, cached for 5 minutes. Look it up by business id, origin or host:

curl -s "$PROVENANCE_API/v1/public/businesses/lookup?origin=https://saltmarsh.example"
{
  "object": "provenance_profile",
  "version": "1",
  "business": { "id": "biz_01JDSAMPLE0SALTMARSH0DATA00", "name": "Saltmarsh Data", "origins": ["https://agents.saltmarsh.example", "https://saltmarsh.example"] },
  "accepts": { "approvals": true, "network_mandates": true, "rails": ["acp", "ap2", "checkout", "x402"] },
  "rules": { "person_required_over": 1000, "currency": "USD" },
  "categories": ["data"],
  "selling": [{
    "agent_id": "agt_01JDSAMPLE0TIDEPOOL0SALES00",
    "name": "Tidepool Sales",
    "kids": ["kOJ8b2…"],
    "origin": "https://agents.saltmarsh.example",
    "endpoints": { "a2a": "https://agents.saltmarsh.example/a2a", "offers": "https://agents.saltmarsh.example/offers" },
    "categories": ["data", "reports"],
    "seller_confirmation": { "offered": "never", "response_time": "1bd" }
  }],
  "profile_url": "https://api.provenanceauth.com/v1/public/businesses/biz_01JDSAMPLE0SALTMARSH0DATA00/profile",
  "directory_url": "https://provenanceauth.com/businesses/biz_01JDSAMPLE0SALTMARSH0DATA00",
  "schema": "https://provenanceauth.com/schemas/provenance-profile/v1.json",
  "revision": 1,
  "updated_at": "2026-10-31T12:00:00.000Z",
  "signature": "eyJhbGciOiJFUzI1NiIsInR5cCI6InByb3ZlbmFuY2UtcHJvZmlsZStqd3QifQ…"
}

signature is an ES256 JWS over the SHA-256 of the profile's canonical JSON, signed with the keys at /.well-known/jwks.json. A copy served anywhere verifies the same way. The format is described in The discovery profile.

3. Serve it on your own domain (optional)

Agents that look at your site find the same profile at /.well-known/provenance.json. It replaces provenance-store.json and provenance-agent.json as the one file, and both older files keep working as proofs. Pick one way, easiest first:

WayWhat to do
Identify middleware or edge templateNothing. They serve the file and add the Link header already.
SDK middlewareOne line: provenanceDiscovery() in Node, ProvenanceDiscovery(app) in Python, Discovery{}.Middleware in Go.
RedirectRedirect /.well-known/provenance.json to your profile_url.
UploadDownload provenance.json from Settings → Store → Discovery and serve it. Upload it again after each change.
import express from "express";
import { provenanceDiscovery } from "@provenanceauth/sdk";

const app = express();
// …your routes…
app.use(provenanceDiscovery({ baseUrl: process.env.PROVENANCE_API }).express()); // after your routes: your own files win

Pages served through the middleware carry Link: </.well-known/provenance.json>; rel="provenance". When you publish no selling agent with an A2A endpoint, no agent card is served. When your domain has an A2A card of its own at /.well-known/agent-card.json, it stays: ours is served only where you have none.

We check each verified domain daily. A copy that doesn't match the signed profile shows as out of date in the console with reason profile_stale, and agents get the hosted profile until it matches.

4. Put the rules in your payment answers

Buyer agents read the 402, the checkout or the merchant agent they already talk to. discoveryFields(profile) returns the block for each rail, so you add it with one call where you build those answers:

import { discoveryFields, x402Challenge, acpExtensionDeclaration, approvalChallenge } from "@provenanceauth/rails";

const f = discoveryFields(profile);
const challenge = x402Challenge({ resource, accepts, profile: f.x402.profile });          // x402 v2: extensions["com.provenanceauth.intent"].info.profile
const declaration = acpExtensionDeclaration({ profile: f.acp.profile });                 // ACP capability data
const merchantMetadata = { ...f.ap2 };                                                    // AP2 merchant agent metadata (maps to AP2 0.2)
const problem = approvalChallenge(order, { merchantName: "Saltmarsh Data", retryUrl, profileUrl: f.checkout.profileUrl });
RailWhere the block goes
x402 v2The 402's com.provenanceauth.intent extension gains info.profile: person_required_over, currency, the seller agent id and key ids, seller_confirmation, offers_url and profile_url.
ACPThe declared com.provenanceauth.intent extension carries the same block as profile, so an agent learns the rules when checkout starts.
AP2 (maps to AP2 0.2)Your merchant agent's metadata carries com.provenanceauth.profile with profile_url and the seller agent id. Provenance never signs AP2 mandates.
Web checkoutThe Provenance-Intent challenge's approval_request carries profile_url.

Every block is present-only. An older client ignores it, and when you pass nothing your answers are unchanged.

5. Show the mark

<script type="module" src="https://unpkg.com/@provenance/embed"></script>
<provenance-mark base-url="https://sandbox-api.provenanceauth.com"></provenance-mark>

The mark reads Works with your agents and links to your directory page. It checks the page's own origin against your published profile and renders only on your verified domains, so a copy on another site shows nothing.

Errors you might see

CodeWhat to do
discovery_origin_unverifiedVerify a store origin or a selling agent's origin, then publish.
profile_not_publishedThe lookup found no published profile for that origin. Publish one, or check the origin.
parameter_invalid on selling.0.agent_idThe agent isn't selling, has no verified origin or no active key. See eligible_agents.

See also