# network.attested.payment.recurring

> 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.recurring)
- [Documentation](https://lexicon.garden/lexicon/did:plc:cq3w3bw7awp2rkeswfdzoubb/network.attested.payment.recurring/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:cq3w3bw7awp2rkeswfdzoubb/network.attested.payment.recurring/examples)

## Definitions

### `network.attested.payment.recurring`

**Type**: `record`

A recurring payment commitment. Immutable once created — supporters cancel and create new subscriptions to change terms. Bills on anniversary dates with automatic retry on failure.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `unit` | `string` | Yes | Billing period. |
| `txnid` | `string` | Yes | Unique transaction identifier for deduplication. Typically a ULID or UUID assigned by the payment broker. |
| `amount` | `integer` | Yes | Amount per billing period in the smallest unit of the given currency. Applications typically enforce a monthly-equivalent range of 500–25000. |
| `subject` | `string` (did) | Yes | DID of the creator receiving payment. |
| `currency` | `string` | Yes | ISO 4217 currency code (e.g. USD, EUR). |
| `createdAt` | `string` (datetime) | Yes | Timestamp of initial subscription creation. |
| `frequency` | `integer` | No | Billing frequency multiplier applied to the unit (e.g. unit=monthly, frequency=3 bills every three months). |
| `signatures` | `array` | No | Attestation entries. Each entry is a com.atproto.repo.strongRef pointing to a network.attested.payment.proof record in a creator or broker repository. |
| `entitlements` | `array` | No | Optional list of strong references to records representing goods or services the payer is entitled to as a result of this payment. Referenced records may use any lexicon; their schemas are not defined by this spec. |

## Raw Schema

```json
{
  "id": "network.attested.payment.recurring",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "subject",
          "amount",
          "currency",
          "unit",
          "txnid",
          "createdAt"
        ],
        "properties": {
          "unit": {
            "type": "string",
            "description": "Billing period.",
            "knownValues": [
              "monthly",
              "quarterly",
              "semiannual",
              "yearly"
            ]
          },
          "txnid": {
            "type": "string",
            "maxLength": 64,
            "description": "Unique transaction identifier for deduplication. Typically a ULID or UUID assigned by the payment broker."
          },
          "amount": {
            "type": "integer",
            "minimum": 1,
            "description": "Amount per billing period in the smallest unit of the given currency. Applications typically enforce a monthly-equivalent range of 500–25000."
          },
          "subject": {
            "type": "string",
            "format": "did",
            "description": "DID of the creator receiving payment."
          },
          "currency": {
            "type": "string",
            "maxLength": 3,
            "minLength": 3,
            "description": "ISO 4217 currency code (e.g. USD, EUR)."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "Timestamp of initial subscription creation."
          },
          "frequency": {
            "type": "integer",
            "default": 1,
            "minimum": 1,
            "description": "Billing frequency multiplier applied to the unit (e.g. unit=monthly, frequency=3 bills every three months)."
          },
          "signatures": {
            "type": "array",
            "items": {
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            },
            "description": "Attestation entries. Each entry is a com.atproto.repo.strongRef pointing to a network.attested.payment.proof record in a creator or broker repository."
          },
          "entitlements": {
            "type": "array",
            "items": {
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            },
            "description": "Optional list of strong references to records representing goods or services the payer is entitled to as a result of this payment. Referenced records may use any lexicon; their schemas are not defined by this spec."
          }
        }
      },
      "description": "A recurring payment commitment. Immutable once created — supporters cancel and create new subscriptions to change terms. Bills on anniversary dates with automatic retry on failure."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
