/api/verify
Read or write a verification row by transaction id. POST creates or re-mints a bearer under an x402-gated settlement; GET returns the row's current status. No token in the URL — the response shape never echoes tokens or evidence fields, only the bearer that lets a partner verify the same row later (for the verified branch).
Methods
GET reads the current status for a transactionId (no DB writes). POST mints a verification under the x402 settlement — on a fresh transactionId the row is created and marked verified; on an existing verified row the bearer is re-minted to the same 'sub'.
Auth
Public. No API key required. Both methods are gated only by the x402 settlement proof on POST — GET returns 400 / 404 with the same canonical envelope for missing input or unknown transactionId.
Cache posture
Public, edge-cacheable header set is NOT enforced on /api/verify — the route stamps no-store headers so a verified row does not leak through a downstream CDN between a re-mint from the partner side and a fresh fetch from another actor.
Request
POST/api/verify
Body: { transactionId: string (1-200), platform?: string [a-z0-9_-]{1,80} }. Headers: X-PAYMENT (required on POST — base64url-encoded JSON with { transactionId, sender, payTo, amount, signature } — see /docs/x402).
Body / parameters
{
"transactionId": "tx_3f8a1b22c4d5e6f7",
"platform": "openlaw"
}Response
200 (verified), 404, 402, 409, 400, 500
{ status: "verified"|"pending"|"rejected", verificationId: string, transactionId: string, token?: string (signed bearer; verified branch only), sessionUrl?: string }. 402 envelope: { resource: "/api/verify", accepts: [{ asset, network, amount, payTo, facilitator? }, ...] }. 409 envelope (replay): { ..., error: "payment_id_already_settled" }.
Try it
Copy-paste curl
Paste the snippet into a terminal or the embedded sandbox panel below. The sandbox runs against the same /api/docs/<endpoint> handler so the wire shape on this page matches the response the evaluator returns.
curl
curl -X POST https://provably-2.polsia.app/api/verify \
-H "content-type: application/json" \
-H 'X-PAYMENT: <base64url( {sender, payTo, amount, transactionId, signature}> > \
-d '{"transactionId":"tx_3f8a1b22c4d5e6f7","platform":"openlaw"}'Response
{
"status": "verified",
"verificationId": "clwxyz...",
"transactionId": "tx_3f8a1b22c4d5e6f7",
"token": "<compact HS256 JWT — sub===verificationId>"
}Embedded sandbox
Fire a same-origin call against /api/docs/verify and read the canonical wire shape back. No external tools, no auth — the docs surface is public.
transactionId ready
Awaiting call. Send a request to render the wire shape back.
Ready to integrate the real endpoint?
Request a sandbox API key →