# net.wireservice.entitlement

> Published by [wireservice.net](https://lexicon.garden/identity/did:plc:lktj64hp7lc3fzuf6iyy7lwj)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:lktj64hp7lc3fzuf6iyy7lwj/net.wireservice.entitlement)
- [Documentation](https://lexicon.garden/lexicon/did:plc:lktj64hp7lc3fzuf6iyy7lwj/net.wireservice.entitlement/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:lktj64hp7lc3fzuf6iyy7lwj/net.wireservice.entitlement/examples)

## Definitions

### `net.wireservice.entitlement`

**Type**: `record`

A reader's access grant, stored in the publication's business space. Authoritative: the processor's state only proposes changes to it. Grants the plan's spaces plus any listed here; at least one of plan or spaces should be set.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `createdAt` | `string` (datetime) | Yes |  |
| `expiresAt` | `string` (datetime) | No | When access ends. Paid entitlements set this to the end of the paid period plus a grace window and extend it on each payment. Omit for open-ended grants. |
| `note` | `string` | No | Why a manual grant exists (e.g., 'Press pass', 'University site license'). |
| `plan` | `string` (at-uri) | No | AT URI of the net.wireservice.plan this entitlement is for. |
| `reader` | `string` (uri) | Yes | URI of the net.wireservice.reader record. |
| `source` | `string` | Yes | Who manages this entitlement. Processor events never modify 'manual' entitlements. |
| `spaces` | `array` | No | Additional spaces granted, beyond the plan's. |
| `stripeSubscriptionId` | `string` | No |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A reader's access grant, stored in the publication's business space. Authoritative: the processor's state only proposes changes to it. Grants the plan's spaces plus any listed here; at least one of plan or spaces should be set.",
      "key": "tid",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "expiresAt": {
            "description": "When access ends. Paid entitlements set this to the end of the paid period plus a grace window and extend it on each payment. Omit for open-ended grants.",
            "format": "datetime",
            "type": "string"
          },
          "note": {
            "description": "Why a manual grant exists (e.g., 'Press pass', 'University site license').",
            "maxGraphemes": 1000,
            "maxLength": 10000,
            "type": "string"
          },
          "plan": {
            "description": "AT URI of the net.wireservice.plan this entitlement is for.",
            "format": "at-uri",
            "type": "string"
          },
          "reader": {
            "description": "URI of the net.wireservice.reader record.",
            "format": "uri",
            "type": "string"
          },
          "source": {
            "description": "Who manages this entitlement. Processor events never modify 'manual' entitlements.",
            "knownValues": [
              "stripe",
              "manual"
            ],
            "maxLength": 64,
            "type": "string"
          },
          "spaces": {
            "description": "Additional spaces granted, beyond the plan's.",
            "items": {
              "format": "space-ref",
              "type": "string"
            },
            "type": "array"
          },
          "stripeSubscriptionId": {
            "maxLength": 256,
            "type": "string"
          }
        },
        "required": [
          "reader",
          "source",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "net.wireservice.entitlement",
  "lexicon": 1
}
```
