Embeds · Guide
Embed Provenance
Use @provenance/embed to put Provenance's ceremonies inside your own pages as <provenance-*> web components: approvals, verification badges and receipts, attested capture, signing, approver enrollment, grants, claim appeals and trace views.
They run in your page and follow its theme, within contrast limits that keep every verdict readable. Passkey steps run in a small frame on Provenance's domain, so a passkey works on any site and on every Provenance page.
Before you begin: export the sandbox account key. Your backend uses it to mint short-lived embed tokens; it never goes to a browser.
export PROVENANCE_API=https://sandbox-api.provenanceauth.com
export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5
Three credentials are involved:
| Credential | Where it lives | What it can do |
|---|---|---|
Secret API key, prv_ or prv_ | Your backend only | Everything your account can do, including minting embed tokens |
Publishable key, prv_ | Your web pages | Identifies your account to the embed endpoints, and reads no data |
Embed token, emb_ | One page view | Lets one widget render one object, for up to 15 minutes |
1. Create a publishable key
Create one per site with POST /. It's safe to ship in your page's HTML:
curl -s $PROVENANCE_API/v1/embed/publishable_keys \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "customer-portal" }' | tee publishable-key.json
export PUBLISHABLE_KEY=$(jq -r .publishable_key publishable-key.json)
const res = await fetch(`${process.env.PROVENANCE_API}/v1/embed/publishable_keys`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ name: "customer-portal" }),
});
const { publishable_key: publishableKey } = await res.json();
import os
import httpx
api, headers = os.environ["PROVENANCE_API"], {"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}
publishable_key = httpx.post(f"{api}/v1/embed/publishable_keys", json={"name": "customer-portal"}, headers=headers).json()["publishable_key"]
{
"id": "01M5Q9JQPY95XBQTTP3TBQE4TM",
"object": "publishable_key",
"publishable_key": "prv_pub_1D10TzJo8F73Z7ZHhWGKPpn0K7suJ0se",
"key_prefix": "prv_pub_1D10TzJo",
"name": "customer-portal",
"environment": "sandbox"
}
2. Mint an embed token on your backend
For each page view, your backend mints a token for one widget and one object with POST /. Only a secret key can do this, so which object a page shows is always your backend's decision. A key mints only its own products' widgets:
| Widgets | The key needs | Create it as |
|---|---|---|
capture, capture_, capture_, appeal | attest | an Attest key |
approve, approvals, heartbeat, grant, agent_, enroll, sign, receipt, verify, badge | authorize or mandate | an Authorize or Mandate key |
checkout_ | authorize | an Authorize key |
run_ | mandate | a Mandate key |
traffic_, traffic_ | identify | an Identify key |
embed, text_ | any account key | any secret key |
A key without the scope gets 403 insufficient_scope, which names the scope. A console session mints by its role. Create a key for the products you embed under Developers → API keys (create a key for your products).
This mints a token for the diagnostic widget, which renders what the token is scoped to:
curl -s $PROVENANCE_API/v1/embed/tokens \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{ "widget": "embed", "object_id": "portal-check", "ttl": 600 }' | tee embed-token.json
export EMBED_TOKEN=$(jq -r .embed_token embed-token.json)
import { Provenance } from "@provenanceauth/sdk";
const prov = new Provenance({ apiKey: process.env.PROVENANCE_KEY!, baseUrl: process.env.PROVENANCE_API });
const { embedToken } = await prov.embed.createToken({ widget: "embed", objectId: "portal-check", ttl: 600 });
from provenanceauth import Provenance
prov = Provenance(os.environ["PROVENANCE_KEY"], base_url=os.environ["PROVENANCE_API"])
embed_token = prov.embed.create_token(widget="embed", object_id="portal-check", ttl=600)["embed_token"]
embed := &pv.Embed{APIBase: os.Getenv("PROVENANCE_API"), SecretKey: os.Getenv("PROVENANCE_KEY")}
minted, err := embed.CreateToken(ctx, pv.EmbedTokenParams{Widget: "embed", ObjectID: "portal-check", TTL: 600})
{
"id": "01M5Q9K926ZPQRVV02J0ZA267H",
"object": "embed_token",
"embed_token": "emb_qZEiUQvIiNdSO2MoRzQBSHr4tJXmvQJPzbjMOkLNO24",
"widget": "embed",
"object_id": "portal-check",
"mode": null,
"expires_at": "2026-10-24T15:58:45.254Z"
}
The widget calls the embed endpoints with the token and the publishable key. You can make the same call to see what it gets back, which is only what the widget renders:
curl $PROVENANCE_API/v1/embed/session \
-H "Authorization: Bearer $EMBED_TOKEN" \
-H "X-Provenance-Publishable-Key: $PUBLISHABLE_KEY"
const session = await (await fetch(`${process.env.PROVENANCE_API}/v1/embed/session`, {
headers: { Authorization: `Bearer ${embedToken}`, "X-Provenance-Publishable-Key": publishableKey },
})).json();
session = httpx.get(
f"{api}/v1/embed/session",
headers={"Authorization": f"Bearer {embed_token}", "X-Provenance-Publishable-Key": publishable_key},
).json()
{
"object": "embed_session",
"widget": "embed",
"object_id": "portal-check",
"mode": null,
"environment": "sandbox",
"trust": { "mark": "Provenance", "consent_is_draft": true }
}
The session also carries branding (your account's name, logo and colours, or null) and passkey, the page on Provenance's domain that runs passkey steps.
3. Render the widget
Load the script once and pass the publishable key and the token to the element. In React, @provenance/embed/react has a typed component for each widget.
<script type="module" src="https://unpkg.com/@provenance/embed"></script>
<provenance-approve
base-url="https://sandbox-api.provenanceauth.com"
publishable-key="prv_pub_1D10TzJo8F73Z7ZHhWGKPpn0K7suJ0se"
embed-token="emb_qZEiUQvIiNdSO2MoRzQBSHr4tJXmvQJPzbjMOkLNO24"
theme="inherit">
</provenance-approve>
<script>
document.querySelector("provenance-approve").addEventListener("pv:approved", (e) => console.log(e.detail));
</script>
Each widget mints with its own widget value and object:
| Element | widget | object_id | What it does |
|---|---|---|---|
<provenance-approve> | approve | An approval ID | Shows a step-up approval with the full action description and takes the decision, with a passkey when required. mode: "consent" relabels it Consent and Decline. A request routed to an approver is decided with the approver's own passkey. |
<provenance-badge>, <provenance-receipt> | None for public proofs; receipt for an account-held receipt | A decision ID | Verify an intent token or receipt in the browser and show the result; see verify tokens offline |
<provenance-capture> | capture | A case ID, or a capture request ID (capr_) | Takes and attests a photo for the case, or runs a capture request's steps with the capture-request attribute (with the capture release on, its sheet opens inside the component before the camera; under Provenance asks, the opt-in step to texts is its first screen). Browser capture is the software hardware tier; hardware-backed capture needs the native SDK. The photo lands with the carrier your server minted under (a capture request's own carrier, else the one your key's requests land with), so it shows in that carrier's claims. |
<provenance-sign> | sign | <agreement_ | One party's signature on a two-sided agreement, with a "verify your copy" hash check in the browser |
<provenance-enroll> | enroll | An approver link ID | Enrolls your user in the approver network with their own passkey, with a one-tap block |
<provenance-grant> | mandate | A grant draft (gdr_), or a grant with mode: "checkin" | Lets a person allow an agent's grant with their passkey, or check in on one; see section 8 |
<provenance-agent-access> | agent_ | None: pass subject: { device_ | The agents a person has allowed on your account, with a Turn off button for each, Turn off all, and an Activity tab |
<provenance-approvals> | approvals | None: pass subject: { approver_ | One outside approver's waiting requests from your company, with Approve selected; see section 9 |
<provenance-appeal> | appeal | A claim ID (minted with a verify key) | The claim decision's plain-language explanation and the appeal form |
<provenance-trace> | None: pass share-id and share-token | A trace share | Shows a shared trace and verifies its manifest in the browser |
<provenance-capture-result> | capture_ | A capture request ID (capr_) | One request's result for your staff, in your own admin tool: the session's hardware grade, the photos, screening and checks, with a slot for your own next step and getToken() to keep the session alive. See capture result in your admin |
<provenance-capture-request> | capture_ | Your case reference, with author and the session's request options | Your staff send a capture request by email, text or QR within the options your server fixed, and see whether it went out. See capture request composer |
<provenance-checkout-result> | checkout_ | A checkout assessment ID (cas_) or cart approval ID (coap_) | One agent checkout for your staff, in your own admin tool: what Identify saw, the assessment, the cart approval and how the shopper answered, with a slot for your own next step. Never a token or the approver's IP. See checkout result in your admin |
<provenance-run-result> | run_ | A run ID (run_) | One agent run for your staff, in your own admin tool: its state, the team's spend against the budget, each agent's chain and the agents' newest actions, with a slot for your own next step. See run result in your admin |
<provenance-counter-offers> | "counter_ | A run ID (run_) | One run's proposals from outside agents and how each was answered, read only, on your own pages: the agent, the offer and its price, whether it was signed, and the answer. See proposals in your pages |
<provenance-capture-list> | capture_ | None: optional filters pinned for the session | Your capture requests for your staff, in your own admin tool: one line each, with tabs, filters, a sort and paging; a selected row opens in the list's own panel. See capture list in your admin |
<provenance-checkout-list> | checkout_ | None: optional filters pinned for the session | Your store's agent checkouts for your staff, in your own admin tool: one line each, with tabs, filters, an order search, a sort and paging; a selected row opens in the list's own panel. See checkout list in your admin |
<provenance-chargeback-protection> | chargeback_ | None: scoped to your account | Your store's Chargeback protection view for your staff, read only: protection used, the three facts and the Protected, Disputed and Not protected tabs. See Chargeback protection in your admin |
<provenance-run-list> | run_ | None: optional filters pinned for the session | Your agent runs for your staff, in your own admin tool: one line each, with tabs, filters, a name or ID search, a sort and paging; a selected row opens in the list's own panel. See run list in your admin |
<provenance-traffic-list> | traffic_ | None: optional filters pinned for the session | The visits Identify's hosted check assessed, for your staff, in your own admin tool: one line each (the outcome, agent or person, signed or not, the bot likelihood), with tabs, filters, a sort and paging; a selected row opens in the list's own panel. See traffic list in your admin |
<provenance-traffic-result> | traffic_ | A traffic assessment ID (tas_) | One assessed visit for your staff, in your own admin tool: the outcome, who visited, the bot likelihood with its named signals and the rule that decided, with a slot for your own next step. See traffic result in your admin |
<provenance-rules> | rules | The kind of rules: checkout, intent or capture | Your rules for your staff, in your own admin tool: the rules your server lists, one line each, with blanks and bounds, locks and the outcome in the console's words. An edit session saves changes within the scope as a draft, and an Advanced session edits whole rules. Scoped on every mint. See rules in your admin |
<provenance-text-consent> | text_ | Your box_ (tcf_) from GET / | The consent box for your own form: one unticked checkbox, Provenance's wording and the mark; ticking it records consent to your texts. See put the consent box on your own form |
The capture result, checkout result, run result, request composer and rules also open on a page Provenance hosts, by a link your server mints, for a phone or an email. See hosted page for results, the hosted rules page, and admin results and requests for the four ways side by side.
The badge, receipt and trace views verify against the published keys from any site, with no key. They're green only when every check passed: a badge whose revocation check couldn't run says "revocation unchecked", and a trace whose keys couldn't load shows amber.
4. Allow your sites
List the sites a publishable key may run on with PATCH /: up to 10 origins, each https://host[:port] with no path. Sandbox keys may also list http://localhost:3000, or http://localhost:* for any local port.
curl -s -X PATCH $PROVENANCE_API/v1/embed/publishable_keys/$(jq -r .id publishable-key.json) \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{ "allowed_origins": ["https://portal.example.com", "http://localhost:*"] }'
await fetch(`${process.env.PROVENANCE_API}/v1/embed/publishable_keys/${keyId}`, {
method: "PATCH",
headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ allowed_origins: ["https://portal.example.com", "http://localhost:*"] }),
});
httpx.patch(
f"{api}/v1/embed/publishable_keys/{key_id}",
json={"allowed_origins": ["https://portal.example.com", "http://localhost:*"]},
headers=headers,
)
{
"id": "01M5Q9JQPY95XBQTTP3TBQE4TM",
"object": "publishable_key",
"key_prefix": "prv_pub_1D10TzJo",
"name": "customer-portal",
"environment": "sandbox",
"allowed_origins": ["https://portal.example.com", "http://localhost:*"],
"created_at": "2026-10-24T15:48:45.254Z",
"revoked_at": null
}
Once a key has a list:
- every embed request from another site gets
403embed_origin_not_allowed, and the component says the site isn't allowed; - only those sites can frame the passkey page for the key.
A key without a list works on any site, and the console shows it as "Any site". Pass "allowed_origins": null to remove a list. You can also manage the list in the console under Developers → API keys → Publishable.
5. Passkeys on your site
Four components confirm with a passkey: approve, order review, sign and enroll. A passkey belongs to the domain it was made on, so these steps run in a small frame served from Provenance's own domain: the same passkey then works in every component, on every site, and on Provenance's hosted pages.
- Confirming (approve, order review, sign) runs in the frame when the person taps your component's button.
- Creating a passkey (enroll) needs a tap inside the frame, so the component's main button is the frame.
- When the frame can't load, for example because your page's Content Security Policy blocks it, the component opens the same page in a small window on the person's tap and finishes there.
- On a device with no passkey support, the component says so and, where a hosted link exists, offers it. It never shows a success it didn't get.
If your site sends a Content Security Policy, allow the frame and the API:
frame-src https://app.provenanceauth.com;
connect-src https://sandbox-api.provenanceauth.com;
6. Theme and appearance
Components follow your page's theme by default (theme="inherit"). They use the first of these that's set:
- A
data-themeof light or dark on the page's root element. - The page's
color-scheme. - The operating system.
They switch in place when your page switches. To fix the theme, set theme to light or dark, or to auto to follow the operating system.
Your look stacks in this order, each layer over the one before:
- Provenance's defaults for the theme.
- Your account's branding (Settings → Branding): the primary colour styles the buttons, and the name and logo head the component. Set
branding="off"to leave it out. - CSS custom properties on the element.
- The
appearanceproperty, from JavaScript or React.
provenance-approve {
--pv-accent: #1d4ed8;
--pv-radius: 10px;
}
document.querySelector("provenance-approve").appearance = {
theme: "inherit",
variables: { accent: "#1d4ed8", card: "#fafaf9" },
density: 0.9,
radius: "8px",
};
| Property | appearance.variables | Sets |
|---|---|---|
--pv-accent | accent | Buttons and links |
--pv-accent-fg | accentFg | Text on buttons (picked for you when you only set the accent) |
--pv-bg | bg | Inner panels and inputs |
--pv-card | card | The component's surface |
--pv-border | border | Borders and dividers |
--pv-fg, --pv-muted | fg, muted | Text colors |
--pv-danger | danger | The Deny and Decline buttons |
--pv-font, --pv-font-mono | font, fontMono | Font families |
--pv-radius | radius | Corner radius |
--pv-space | density | Spacing, from 0.85 to 1.25 |
Every color pair is checked against a contrast floor before it renders:
| Pair | Floor |
|---|---|
| Button text on the accent | 4.5:1 |
| Text on the card | 7:1 |
| Muted text on the card | 4.5:1 |
| Accent on the card | 3:1 |
| Deny and Decline text on the card | 4.5:1 |
| Verdict colors on the card | 4.5:1 |
A value under its floor is replaced by the theme's default, and the component logs one console warning with the variable and the measured ratio, so a component never renders unreadable. After changing a property from script, call el.refreshAppearance().
Style the component's parts with ::part():
| Part | Element |
|---|---|
card | The component's outer box |
header | Your brand name and logo, when branding is set |
title | The heading |
body | The content area |
button-primary, button-secondary | Buttons |
input | Text inputs |
status | The progress and error line |
The Provenance mark, verdict and risk colors, DRAFT consent markers, the action and amount block, and the wording of decision buttons have no part and ignore every override, so a verdict always looks like one and the person always sees what they're approving.
Consent wording that's still under legal review comes from the API with consent.draft: true and a DRAFT marker. The components show the person the plain consent summary only and still send the consent version with their answer. To see the marker on a review page, add the show-draft-legal attribute to the element (showDraftLegal in React).
In React, @provenance/embed/react has a typed component for each element, such as ProvenanceApprove. Each takes an appearance, a class name, a style and an event map typed to that component's events.
7. Confirm outcomes on your server
Widgets fire pv:* events, such as pv:ready when they load and pv:approved when a person approves, so your page can react. Each widget's events are in the package README. They come from the browser, so don't act on them alone: confirm with a webhook or by reading the object from your backend.
8. Agents and appeals in your product
Four components let a person act on standing authority and decisions without leaving your product. Each takes the branding of the company that shows it: your logo, name, primary button colour and corners. The limits, the spend meter, verdict colours, explanation text, the Turn off button and the Provenance footer never change.
Allow a grant. Create a draft for the person's device with the limits you want. It lasts up to 15 minutes and creates nothing until the person allows it:
curl -s -X POST $PROVENANCE_API/v1/mandate/grant_drafts \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{ "device_id": "dev_00000000000000000000000000000001", "agent": { "name": "Cartwise", "description": "Cartwise Labs · your shopping assistant" }, "constraints": { "max_amount": 50, "budget_amount": 200, "budget_window": "month", "allowed_counterparties": ["quillstack.example"], "heartbeat": { "interval": "monthly" }, "expires_at": "2027-12-31T23:59:59Z" } }'
const draft = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/grant_drafts`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
device_id: "dev_00000000000000000000000000000001",
agent: { name: "Cartwise", description: "Cartwise Labs · your shopping assistant" },
constraints: { max_amount: 50, budget_amount: 200, budget_window: "month", allowed_counterparties: ["quillstack.example"], heartbeat: { interval: "monthly" }, expires_at: "2027-12-31T23:59:59Z" },
}),
})).json();
draft = httpx.post(
f"{api}/v1/mandate/grant_drafts",
headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"},
json={
"device_id": "dev_00000000000000000000000000000001",
"agent": {"name": "Cartwise", "description": "Cartwise Labs · your shopping assistant"},
"constraints": {"max_amount": 50, "budget_amount": 200, "budget_window": "month", "allowed_counterparties": ["quillstack.example"], "heartbeat": {"interval": "monthly"}, "expires_at": "2027-12-31T23:59:59Z"},
},
).json()
Mint a mandate token for the draft's id and render <provenance-grant>. The person sees each limit in plain words ("Only at quillstack.example", "Check in every month") and taps Allow, which their passkey signs, or Not now. Allow creates exactly the grant POST / would, with biometric_verified: true. On pv:granted, read the draft from your backend with GET /: once allowed it carries grant_id and the mandate_token for your agent.
Check in. For a grant with a check-in (constraints.heartbeat), mint a mandate token with the grant's ID and mode: "checkin", and render <provenance-grant mode="checkin">. It shows what the agent spent this window and its limits. Keep it on is the person's passkey over this period's check-in; Turn it off revokes the grant after a "Turn off Cartwise?" confirm, with no passkey, since it only reduces what the agent can do. Events: pv:checked_in, pv:revoked.
Show a person's agents. On a settings page, mint an agent_access token for the signed-in person's device:
<!-- your backend: POST /v1/embed/tokens { "widget": "agent_access", "subject": { "device_id": "…" } } -->
<provenance-agent-access base-url="…" publishable-key="prv_pub_…" embed-token="emb_…"></provenance-agent-access>
<provenance-agent-access mode="summary" base-url="…" publishable-key="prv_pub_…" embed-token="emb_…"></provenance-agent-access>
The list shows that person's agents on your account only: their limits, spend this window, last use and next check-in, and a Turn off button for each (pv:revoked { grant_id }). Agents turned off or expired in the last 30 days are kept under a collapsed "Turned off and expired".
With two or more agents on, Turn off all agents asks once ("Turn off 3 agents? They'll need your approval for everything until you turn them on again.") and then revokes every one of them, with no passkey since it only reduces what agents can do. It fires pv:revoked_all { count }. Each grant turned off in the component, one at a time or all at once, sends you a mandate.grant.revoked webhook with revoked_by: "person", so your backend stops relying on it.
The Activity tab lists the last 90 days, 20 at a time: each action your agents took under this person's grants (allowed or blocked) and each approval the person decided, with the agent, the action, the amount, the outcome and the time. Receipt opens the row's signed receipt in <provenance-receipt>, which checks the signature in the browser. Only this person's rows are listed.
mode="summary" renders just the count and the next check-in, for a settings row. The token's object_id is a pairwise value; the device ID never reaches the browser. An agent another company made shows its avatar; your own agent doesn't need one.
Take an appeal. Mint an appeal token for one of your carrier's claims with your verify key and render <provenance-appeal>. It shows the decision's plain-language explanation from the fixed templates, then a reason (up to 2,000 characters) and up to 3 photos or PDFs. The appeal lands in the same queue as the hosted link (pv:appealed { appeal_id }). Appeals are free on every plan; see cases and appeals.
When a device has no passkey support, the components say "This device can't confirm with a passkey" instead of offering a button that can't work.
9. An approver's inbox in your product
People outside your company who approve for you, such as a client's finance lead on an approver link, can decide your requests inside your own app instead of opening each link. Mint an approvals token with one of your accepted approver links:
curl -s -X POST $PROVENANCE_API/v1/embed/tokens \
-H "Authorization: Bearer $PROVENANCE_KEY" \
-H "Content-Type: application/json" \
-d '{ "widget": "approvals", "subject": { "approver_link_id": "lnk_01M6W1R5Q7B9C3D5E7F9G1H3J5" } }'
const { embed_token } = await (await fetch(`${process.env.PROVENANCE_API}/v1/embed/tokens`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ widget: "approvals", subject: { approver_link_id: "lnk_01M6W1R5Q7B9C3D5E7F9G1H3J5" } }),
})).json();
token = httpx.post(
f"{api}/v1/embed/tokens",
headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"},
json={"widget": "approvals", "subject": {"approver_link_id": "lnk_01M6W1R5Q7B9C3D5E7F9G1H3J5"}},
).json()
<provenance-approvals base-url="…" publishable-key="prv_pub_…" embed-token="emb_…"></provenance-approvals>
Mint it only for the approver who's signed in to your app. The link must be accepted (an invited link has no approver yet), and the token lasts up to 15 minutes. Its object_id is a pairwise value; the approver's ID never reaches the browser.
- The list. The requests you routed to this approver that wait for them, newest first, with the same facts as the approval page: the exact action, the amount, the agent, a store's order, what a revised request changed, and on a group request "1 of 2 approved" with the names of those who decided. Requests from other companies and other approvers never show.
- Review. One request: Approve with the approver's own passkey, Reject with a reason, or Ask for a change (a single request only; on a group request each approver approves or rejects).
- Approve selected. Tick up to 25 and approve them with one passkey prompt; see batch approvals. A request that can't go in a batch has no box and says "Review on its own" with the reason.
Only the approver's passkey can approve, never your devices or your API key, and the decision is recorded as theirs. The component needs Pro or the Free trial. It fires:
| Event | When | Detail |
|---|---|---|
pv:approved, pv:denied, pv:changes_ | The approver decided one request | approval_ |
pv:batch_ | Approve selected finished | batch_, count, approval_ |
Confirm each decision on your server from the webhook, never from the event alone.
Checkout approval
<provenance-checkout-approval> is the approval screen a browser agent can read, for your checkout page while an order waits for the shopper. It needs no key: pass the request token from the approve link. Under Provenance asks, the opt-in step to texts comes first when the approval carries a phone with no consent. The Identify middleware's HTML answer is this component on a minimal page (five-minute checkout).
- As plain text, it shows your store's name, the cart and its total, and the status.
- It shows the approve link with a QR code on a desktop and the link alone on a phone, or "We've sent the approval to the phone ending 42" when you sent it to your customer.
qr="on"orqr="off"forces the QR code either way. - It waits on the approval and fires the outcome, so your page moves on without a reload.
<provenance-checkout-approval approval="Hq2vN8xK4tB7mW3sYd9cFj" base-url="https://api.provenanceauth.com"></provenance-checkout-approval>
In React: <ProvenanceCheckoutApproval baseUrl="…" approval="…" onEvent={{ "pv:approved": () => router.refresh() }} /> from @provenance/embed/react. Confirm the order on your server from the webhook, never from the event alone.
Errors you might see
| Symptom | Cause | Fix |
|---|---|---|
401 embed_, "Missing or malformed publishable key" | The page didn't send the publishable key | Set the publishable-key attribute. |
401 embed_ on render | The token expired, or was minted for another widget or object | Mint a fresh token for this widget and object. |
400 parameter_ on ttl | Longer than 15 minutes | Use 900 seconds or less. |
403 embed_ | The key lists its allowed origins and this site isn't one | Add the site with PATCH /. |
| "Allow pop-ups for this site" on a passkey step | The frame couldn't load and the browser blocked the passkey window | Allow the frame in your Content Security Policy (frame-src), or let the site open pop-ups. |
402 trial_ minting capture, capture_, capture_, sign, order, mandate, agent_ or approvals | The Free trial ended | Choose a plan in Settings → Plan & usage; see plans and usage. |
400 embed_ | A result widget was given another kind of ID, such as an assessment for capture_ | Mint the widget that matches the object. |
400 parameter_ on subject. | The approver hasn't accepted the link yet, or it was revoked | Mint once the link's status is active. |
409 batch_ on Approve selected | A ticked request can't be batched (over batch_, options, a first-time payee, a rule's individual) | Approve it on its own. |
409 grant_ on Allow | The draft was already allowed or declined, or its 15 minutes ran out | Create a new draft and mint a new token. |
See also
Shared across products:
Each product's widgets for your own admin tool:
| Product | Widgets |
|---|---|
| Identify | Traffic list, traffic result |
| Authorize | Checkout list, checkout result, Chargeback protection |
| Attest | Capture list, capture result, capture request composer |
| Mandate | Run list, run result, proposals |
Elsewhere in the docs: