> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://docs.navalabs.ai/api/mcp` to find what you need.

# Verification

Quote and verify x402 payments.

## Verify a payment and apply Nava Guardian

`POST /verify`

Validates the x402 payment and applies GUARDIAN_MODE using enrollment resolved from the signed payer wallet. In off mode every wallet uses vanilla x402. In optional mode an enrolled wallet is Guardian-gated and an unenrolled wallet uses vanilla x402. In required mode an unenrolled wallet is invalid with "payer wallet not enrolled". Enrollment lookup errors always fail closed in optional and required mode. This operation never settles the merchant payment.

### Request body (required) (`application/json`)

- `paymentPayload` `object` _(required)_: Raw x402 payment payload, including the signed authorization. Caller-supplied policyId, agentId, and navaApiKey fields are ignored and stripped before base x402 verification. Policy is resolved from the payer wallet through the facilitator's integration.
- `paymentRequirements` `object` _(required)_
  - `scheme` `string` _(required)_
  - `network` `string` _(required)_
  - `asset` `string` _(required)_
  - `payTo` `string` _(required)_
  - `price` `string | object`: Amount in token base units.
  - `resource` `string`
- `verificationRequirements` `object`
  - `scheme` `string` _(required)_
  - `network` `string` _(required)_
  - `asset` `string` _(required)_
  - `payTo` `string` _(required)_
  - `price` `string | object`: Amount in token base units.
  - `resource` `string`

### Responses

#### `200`: Verification completed. Read `isValid`; HTTP success alone is not approval.

Body (`application/json`):

- `isValid` `boolean` _(required)_
- `invalidReason` `string`: Human-readable rejection. Guardian enrollment failures include "payer wallet not enrolled" in required mode and "Guardian enrollment lookup unavailable: ..." when policy lookup is unavailable or invalid. Lookup errors never bypass Guardian.
- `payer` `string`
- `guardianStatus` `string`
- `guardianReason` `string`
- `feeTxHash` `string`
- `feeError` `string`

#### `400`: Malformed or incomplete payment input.

Body (`application/json`):

- `error` `string`
- `message` `string`

#### `401`: The configured facilitator key is absent or invalid.

#### `500`: A required Developer Preview dependency failed; do not grant access.

### Example request

```bash
curl https://gateway.example.navalabs.ai/verify \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "paymentPayload": {},
  "paymentRequirements": {
    "scheme": "string",
    "network": "base",
    "asset": "string",
    "payTo": "string",
    "price": "string",
    "resource": "string"
  },
  "verificationRequirements": {
    "scheme": "string",
    "network": "base",
    "asset": "string",
    "payTo": "string",
    "price": "string",
    "resource": "string"
  }
}'
```

```ts
fetch('https://gateway.example.navalabs.ai/verify', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    paymentPayload: {},
    paymentRequirements: {
      scheme: 'string',
      network: 'base',
      asset: 'string',
      payTo: 'string',
      price: 'string',
      resource: 'string'
    },
    verificationRequirements: {
      scheme: 'string',
      network: 'base',
      asset: 'string',
      payTo: 'string',
      price: 'string',
      resource: 'string'
    }
  })
})
```

## Fetch verification-fee requirements

`POST /verification/quote`

Passes the merchant requirement to the configured pricing service. Nava Gateway does not calculate the verification fee.

### Request body (required) (`application/json`)

- `resource` `object` _(required)_
  - `scheme` `string` _(required)_
  - `network` `string` _(required)_
  - `asset` `string` _(required)_
  - `payTo` `string` _(required)_
  - `price` `string | object`: Amount in token base units.
  - `resource` `string`

### Responses

#### `200`: Fee requirement, or null when pricing is disabled or no fee applies.

Body (`application/json`):

- `requirements` `object` _(required)_
  - `scheme` `string` _(required)_
  - `network` `string` _(required)_
  - `asset` `string` _(required)_
  - `payTo` `string` _(required)_
  - `price` `string | object`: Amount in token base units.
  - `resource` `string`

#### `400`: Malformed or incomplete payment input.

Body (`application/json`):

- `error` `string`
- `message` `string`

#### `401`: The configured facilitator key is absent or invalid.

#### `502`: Pricing service unavailable.

### Example request

```bash
curl https://gateway.example.navalabs.ai/verification/quote \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "resource": {
    "scheme": "string",
    "network": "base",
    "asset": "string",
    "payTo": "string",
    "price": "string",
    "resource": "string"
  }
}'
```

```ts
fetch('https://gateway.example.navalabs.ai/verification/quote', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    resource: {
      scheme: 'string',
      network: 'base',
      asset: 'string',
      payTo: 'string',
      price: 'string',
      resource: 'string'
    }
  })
})
```
