# Verify

The free check of any Provenance token or receipt, with no key.

Related guide: [Verify a token](https://provenanceauth.com/docs/authorize/guides/verify-tokens.md)

## Endpoints

- `POST /v1/verify`: [Verify a token or receipt](#post-v1-verify)

## The token verification result object

### Attributes

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | enum | yes | Always `verification_result`. One of `verification_result`. |
| `valid` | boolean | yes | The signature, issuer, expiry, binding and revocation all check out, and no approval on the token is open or was decided against. |
| `reason` | string \| null | yes | Why `valid` is false: `invalid_token`, `token_expired`, `issuer_mismatch`, `binding_mismatch`, `token_revoked`, `status_unavailable`, a holder-bound grant's `dpop_proof_required`, `dpop_proof_invalid`, `dpop_proof_replayed` or `holder_mismatch`, or an approval hold: `approval_pending` (the person hasn't answered yet), `approval_denied`, `approval_expired`, `approval_changes_requested` or `option_not_chosen`. Null when valid. |
| `kind` | enum | yes | What was checked. One of `intent`, `grant`, `receipt`. |
| `claims` | object | yes | The free claims (for an intent token `iss`, `jti`, `sub`, `iat`, `exp`, `aud`, `action_hash`, `payload_hash`, `order`, `confirmed`, `agent`, `risk` and the other free claims). |
| `binding` | enum | yes | Whether the token binds what you passed in `expected`. One of `match`, `mismatch`, `not_checked`. |
| `revoked` | boolean \| null | yes | Null when revocation couldn't be checked (then `valid` is false with `status_unavailable`). |
| `confirmed` | object \| null | yes | When and how a person's yes stands now: the token's own `confirmed` claim, or the time the person approved when they approved after the token was minted. Null when no person's yes stands (a rule alone allowed it), and whenever `valid` is false. |
| `confirmed.at` | timestamp | yes | When the person said yes. |
| `confirmed.via` | enum | yes | An approval of this action, or a standing grant. One of `approval`, `grant`. |
| `risk` | object | yes | A coarse score and action, checked live (a revoked token is `block`). |
| `risk.score` | integer | yes | From 0 (low) to 100. |
| `risk.action` | enum | yes | What the score suggests. One of `allow`, `review`, `block`. |
| `checked_at` | timestamp | yes | When the check ran. |

### Example

```json
{
  "object": "verification_result",
  "valid": true,
  "reason": null,
  "kind": "intent",
  "claims": {
    "iss": "provenance-authorize",
    "jti": "3b8e288d-b794-49cf-afc5-b7e8f9a66386",
    "sub": "anon_brlix2gzahsh4qyu3wgmj4urcy",
    "iat": 1794105610,
    "exp": 1794120010,
    "action_hash": "7080546df762bf502e8d42cbdba9a55b1f4070e1661da8b2ee950bceaaa7d438",
    "payload_hash": "df2a8a3339a1b7adc5ec11027e91af0716faeaeaaa2f8e98276bea02e4dfda46",
    "risk": {
      "score": 30,
      "action": "allow"
    }
  },
  "binding": "match",
  "revoked": false,
  "confirmed": null,
  "risk": {
    "score": 30,
    "action": "allow"
  },
  "checked_at": "2026-11-08T02:40:10.770Z"
}
```

## Verify a token or receipt

`POST /v1/verify`

Free and keyless. Checks any Provenance intent token, grant token or receipt: the ES256 signature, the issuer, the expiry, the binding you expect, revocation and [approval holds](https://provenanceauth.com/docs/authorize/guides/verify-tokens.md#approval-holds). Answers with the free claims only. Rate-limited per IP.

Auth: none. No API key needed.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `token` | body | string | no | An intent token or grant token. Pass this or `receipt`. |
| `receipt` | body | string | no | A signed receipt. Pass this or `token`. |
| `expected` | body | object | no | What the token should bind. `binding` reports `match` or `mismatch`. |
| `expected.action_payload` | body | any | no | The exact payload; its canonical SHA-256 must be the token's `payload_hash`. |
| `expected.order` | body | object | no | The order's `total` (minor units), `currency` and `merchant_id`, compared with the token's `order`. |
| `expected.order.total` | body | integer | no | The total in minor units. |
| `expected.order.currency` | body | string | no | The ISO 4217 currency. |
| `expected.order.merchant_id` | body | string | no | Your merchant ID. |
| `expected.audience` | body | string | no | Your origin or merchant ID, compared with the token's `aud`. |
| `presenter` | body | object | no | Who presented a holder-bound grant to you (its `cnf.jkt`): the `DPoP` header they sent and the request it came on. Without it a bound grant answers `dpop_proof_required`. |
| `presenter.dpop` | body | string | yes | The DPoP proof (RFC 9449) from the request's `DPoP` header. |
| `presenter.method` | body | string | yes | The request's method (`POST`). |
| `presenter.url` | body | string | yes | The request's full URL; its query is ignored. |
| `surface` | body | enum | no | Where the check runs (counted only). One of `page`, `embed`, `checkout`, `api`. |

### Returns

The result. `valid` is false with a `reason` when any check fails. See [the token verification result object](#object).

### Errors

- [`invalid_json`](https://provenanceauth.com/docs/platform/errors.md#invalid_json)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`parameter_missing`](https://provenanceauth.com/docs/platform/errors.md#parameter_missing)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)

### Request

**curl**

```bash
curl -s -X POST "$PROVENANCE_API/v1/mandate/intents" \
  -H "Authorization: Bearer prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe" \
  -H "Content-Type: application/json" \
  -d '{
    "action_description": "Pay invoice INV-2041",
    "action_payload": {
      "type": "payment",
      "amount": 1850,
      "currency": "USD",
      "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_reference_public",
    "device_id": "dev_00000000000000000000000000000001"
  }' > step.json
export INTENT_TOKEN=$(jq -r '.intent_token' step.json)
curl -X POST "$PROVENANCE_API/v1/verify" \
  -H "Content-Type: application/json" \
  -d "{
    \"token\": \"$INTENT_TOKEN\",
    \"expected\": {
      \"action_payload\": {
        \"type\": \"payment\",
        \"amount\": 1850,
        \"currency\": \"USD\",
        \"payee\": \"acct_brindlecote_supplies\"
      }
    }
  }"
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/intents`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "action_description": "Pay invoice INV-2041",
    "action_payload": {
      "type": "payment",
      "amount": 1850,
      "currency": "USD",
      "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_reference_public",
    "device_id": "dev_00000000000000000000000000000001"
  }),
})).json();
const intentToken = step1.intent_token;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/verify`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "token": intentToken,
    "expected": {
      "action_payload": {
        "type": "payment",
        "amount": 1850,
        "currency": "USD",
        "payee": "acct_brindlecote_supplies"
      }
    }
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/mandate/intents", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}, json={
    "action_description": "Pay invoice INV-2041",
    "action_payload": {
        "type": "payment",
        "amount": 1850,
        "currency": "USD",
        "payee": "acct_brindlecote_supplies"
    },
    "agent_session_id": "sess_reference_public",
    "device_id": "dev_00000000000000000000000000000001"
}).json()
intent_token = step1["intent_token"]
data = httpx.post(f"{api}/v1/verify", json={
    "token": intent_token,
    "expected": {
        "action_payload": {
            "type": "payment",
            "amount": 1850,
            "currency": "USD",
            "payee": "acct_brindlecote_supplies"
        }
    }
}).json()
```

### Response 200

```json
{
  "object": "verification_result",
  "valid": true,
  "reason": null,
  "kind": "intent",
  "claims": {
    "iss": "provenance-authorize",
    "jti": "3b8e288d-b794-49cf-afc5-b7e8f9a66386",
    "sub": "anon_brlix2gzahsh4qyu3wgmj4urcy",
    "iat": 1794105610,
    "exp": 1794120010,
    "action_hash": "7080546df762bf502e8d42cbdba9a55b1f4070e1661da8b2ee950bceaaa7d438",
    "payload_hash": "df2a8a3339a1b7adc5ec11027e91af0716faeaeaaa2f8e98276bea02e4dfda46",
    "risk": {
      "score": 30,
      "action": "allow"
    }
  },
  "binding": "match",
  "revoked": false,
  "confirmed": null,
  "risk": {
    "score": 30,
    "action": "allow"
  },
  "checked_at": "2026-11-08T02:40:10.770Z"
}
```
