View as Markdown

Concepts

Intent tokens and receipts

An intent token is a short-lived ES256 signature that binds one exact action an agent is about to take, so whoever runs the action can check that it was authorized. A receipt is a signed record of a decision after it was made, so anyone you hand it to can check what was decided without trusting you or Provenance.

When to use it

  • A store, a bank or another agent receives an order and checks the token that came with it before it ships or pays.
  • You hand a counterparty, an auditor or a card network proof of who approved an action and under which rule.
  • Your own service checks a token or a receipt offline, with no API key and no call to Provenance.

How it works

  1. An agent asks first. POST /v1/mandate/intents returns an intent_token for one action description and, optionally, its exact payload. When the account's rules ask a person, the token stays on hold until they approve.
  2. Whoever runs the action checks the token. The signature, the expiry and the hashes of the description and payload must match what is about to run.
  3. Every decision is recorded and can be signed. Each check writes a record to the decision ledger; its receipt is the same record, signed, for anyone to verify.
  1. Intent token
    ES256, binds the action's hashes
  2. Check before it runs
    offline, POST /v1/verify, or with your key
  3. Receipt
    ES256, the decision as recorded

Both are signed with ES256 by the same keys, published at GET /.well-known/jwks.json. Each token's header names its key in kid, so a key rotation lists both keys for a while and old tokens keep verifying. Only ES256 is accepted: a token with any other alg fails with reason invalid_token.

Intent tokens

An intent token is a JWT that lasts four hours. The claims you'll check most:

ClaimWhat it holds
jtiThe token's ID, the attestation_id returned when it was minted. Used for revocation.
subAn opaque subject for the person, never a device id: the same for one person at your site, and unrelated at every other site, when the token names an audience.
audThe one site the token is for, when the agent named one. Accept it only when it names you.
action_hashSHA-256 of the approved action description.
payload_hashSHA-256 of the canonical JSON of the approved payload, when one was bound.
confirmedWhen a person approved and how it reached them. Present only when a person approved.
expThe expiry.

The full list, and the paid check that adds how the person approved, are in verify a token.

A grant token works the same way for standing permission: a person grants an agent limits once with POST /v1/mandate/grants, and the agent shows the signed mandate_token instead of asking each time (grants).

Receipts

Every receipt endpoint returns the same receipt object: claims, the signed content decoded; token, the ES256 JWS that carries it; and verify_url, a link that opens it on the console's Verify a proof page. Receipts are rebuilt from the ledger record each time, never stored.

A receipt you hand to a third party, such as through the receipt embed, carries the free claims only: the decision, its result and its place in the hash chain, with no device, session, agent or approval detail.

Check a token or a receipt

CheckKeyWhat it confirms
Offline, against the published keysNoneSignature and expiry
POST /v1/verifyNoneSignature, issuer, expiry, revocation, approval holds, the payload binding and the free claims
POST /v1/authorize/verificationsYour account keyAll of that, your checkout rules and how the person approved
POST /v1/mandate/assessmentsA key for the issuing accountEvery check at once, with your policy, and a new ledger record

The offline verifiers are in the Node and Python SDKs and in verifier-only libraries for Python and Go (SDKs and tools). To check one by hand, paste it into the console's Verify a proof page.