# dev.cocore.compute.verifySettlement

> Published by [cocore.dev](https://lexicon.garden/identity/did:plc:5quuhkmwe2q4k3azfsgg7kdz)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:5quuhkmwe2q4k3azfsgg7kdz/dev.cocore.compute.verifySettlement)
- [Documentation](https://lexicon.garden/lexicon/did:plc:5quuhkmwe2q4k3azfsgg7kdz/dev.cocore.compute.verifySettlement/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:5quuhkmwe2q4k3azfsgg7kdz/dev.cocore.compute.verifySettlement/examples)

## Definitions

### `dev.cocore.compute.verifySettlement`

**Type**: `query`

Verify an indexed settlement against its receipt and the requester's payment authorization: confirms the settlement chain is internally consistent and signed by the settling repo. Returns the verification verdict plus any findings.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes | The settlement record URI to verify. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `ok` | `boolean` | Yes |  |
| `findings` | `array` | Yes |  |

#### Errors

- **InvalidRequest**: The `uri` parameter is missing.
- **NotFound**: The settlement, or its referenced receipt/authorization, is not indexed.

## Raw Schema

```json
{
  "id": "dev.cocore.compute.verifySettlement",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "InvalidRequest",
          "description": "The `uri` parameter is missing."
        },
        {
          "name": "NotFound",
          "description": "The settlement, or its referenced receipt/authorization, is not indexed."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "ok",
            "findings"
          ],
          "properties": {
            "ok": {
              "type": "boolean"
            },
            "findings": {
              "type": "array",
              "items": {
                "ref": "dev.cocore.defs#verifyFinding",
                "type": "ref"
              }
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "uri"
        ],
        "properties": {
          "uri": {
            "type": "string",
            "format": "at-uri",
            "description": "The settlement record URI to verify."
          }
        }
      },
      "description": "Verify an indexed settlement against its receipt and the requester's payment authorization: confirms the settlement chain is internally consistent and signed by the settling repo. Returns the verification verdict plus any findings."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
