# network.attested.payment.lookup

> Published by [attested.network](https://lexicon.garden/identity/did:plc:cq3w3bw7awp2rkeswfdzoubb)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:cq3w3bw7awp2rkeswfdzoubb/network.attested.payment.lookup)
- [Documentation](https://lexicon.garden/lexicon/did:plc:cq3w3bw7awp2rkeswfdzoubb/network.attested.payment.lookup/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:cq3w3bw7awp2rkeswfdzoubb/network.attested.payment.lookup/examples)

## Definitions

### `network.attested.payment.lookup`

**Type**: `query`

Look up verified payment records between a payer and a recipient. Returns only records whose attestations have been cryptographically verified. Results may include any combination of oneTime, recurring, and scheduled payment records.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `payer` | `string` (did) | Yes | DID of the payer (supporter). |
| `brokers` | `array` | No | Optional list of broker DIDs. When provided, only returns payments that have at least one validating signature from an identity in this list. |
| `recipient` | `string` (did) | Yes | DID of the recipient (creator). |
| `paymentType` | `string` (nsid) | No | Optional filter by payment collection. Must be a full NSID identifying one of the network.attested.payment record types. |
| `entitlements` | `array` | No | Optional list of entitlement AT-URIs. When provided, only returns payments whose entitlements array contains one or more of the given references. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `payments` | `array` | Yes | List of verified payment records. Each element is a union of network.attested.payment.oneTime, network.attested.payment.recurring, or network.attested.payment.scheduled, discriminated by its $type field. |

## Raw Schema

```json
{
  "id": "network.attested.payment.lookup",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "payments"
          ],
          "properties": {
            "payments": {
              "type": "array",
              "items": {
                "refs": [
                  "network.attested.payment.oneTime",
                  "network.attested.payment.recurring",
                  "network.attested.payment.scheduled"
                ],
                "type": "union"
              },
              "description": "List of verified payment records. Each element is a union of network.attested.payment.oneTime, network.attested.payment.recurring, or network.attested.payment.scheduled, discriminated by its $type field."
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "payer",
          "recipient"
        ],
        "properties": {
          "payer": {
            "type": "string",
            "format": "did",
            "description": "DID of the payer (supporter)."
          },
          "brokers": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "did"
            },
            "description": "Optional list of broker DIDs. When provided, only returns payments that have at least one validating signature from an identity in this list."
          },
          "recipient": {
            "type": "string",
            "format": "did",
            "description": "DID of the recipient (creator)."
          },
          "paymentType": {
            "type": "string",
            "format": "nsid",
            "description": "Optional filter by payment collection. Must be a full NSID identifying one of the network.attested.payment record types.",
            "knownValues": [
              "network.attested.payment.oneTime",
              "network.attested.payment.recurring",
              "network.attested.payment.scheduled"
            ]
          },
          "entitlements": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "at-uri"
            },
            "description": "Optional list of entitlement AT-URIs. When provided, only returns payments whose entitlements array contains one or more of the given references."
          }
        }
      },
      "description": "Look up verified payment records between a payer and a recipient. Returns only records whose attestations have been cryptographically verified. Results may include any combination of oneTime, recurring, and scheduled payment records."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
