Skip to content
Sign in Create account

Verify a receipt envelope

POST /api/v1/receipts/verify

Verifies the ECDSA P-256 signature, the chain linkage, and the claim schema. Does not require a logged-in user; verification is public.

This operation needs no authentication.

Request body

application/json ReceiptsVerifyRequest

Generated sample

{
  "receipt": {
    "alg": "ecdsa-p256-sha256",
    "chain": {
      "chain_id": "string",
      "prev_hash": "string",
      "seq": 0
    },
    "claims": {
      "egress_attestation": {
        "attester": "desktop",
        "attester_build_hash": "string",
        "zero_payload_proof": {}
      },
      "routing_decision": {
        "model": "string",
        "provider_id": "string",
        "provider_region": "string",
        "reason": "user-selected"
      },
      "tokenisation": {
        "detectors": [
          {
            "count": 0,
            "fingerprint_hmac": "string",
            "id": "string",
            "version": "string"
          }
        ],
        "input_hash": "string",
        "level": "tokenise-reversible",
        "output_hash": "string",
        "tokeniser_binary_hash": "string"
      },
      "x-cloakapi-detection": {
        "basis": "client_declared",
        "coverage": "rules_only",
        "engine_identity": "not_declared"
      }
    },
    "exp": 0,
    "iat": 0,
    "iss": "https://example.com",
    "jti": "string",
    "kid": "string",
    "nbf": 0,
    "sig": "string",
    "sub": "string",
    "v": "v1"
  }
}

Responses

200 Verification result

application/json ReceiptsVerifyResponse

  • chain_ok boolean
  • error string or null
  • kid string
  • seq integer
  • valid boolean

Generated sample

{
  "chain_ok": true,
  "error": "string",
  "kid": "string",
  "seq": 0,
  "valid": true
}
400 The request body does not contain a recognized receipt payload.

application/json object

  • error object required
    • code string required
      One of: "invalid_payload"
    • message string required
410 Error response.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

422 Malformed receipt

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

429 Error response.

application/json GenericError

  • error any

    One of

    • string
    • object

      Any keys are accepted.

  • error_code string
  • code string
  • message string
  • detail string
  • status any

    One of

    • string
    • integer
  • errors object

    Any keys are accepted.

text/html string