{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A one-time payment from a supporter to a creator. Represents a single, non-recurring financial transaction attested by one or more parties.",
      "key": "tid",
      "record": {
        "properties": {
          "amount": {
            "description": "Payment amount in the smallest unit of the given currency (e.g. cents for USD).",
            "minimum": 1,
            "type": "integer"
          },
          "createdAt": {
            "description": "Timestamp of record creation.",
            "format": "datetime",
            "type": "string"
          },
          "currency": {
            "description": "ISO 4217 currency code (e.g. USD, EUR).",
            "maxLength": 3,
            "minLength": 3,
            "type": "string"
          },
          "entitlements": {
            "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.",
            "items": {
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            },
            "type": "array"
          },
          "memo": {
            "description": "Optional note from the supporter.",
            "maxGraphemes": 256,
            "maxLength": 1024,
            "type": "string"
          },
          "signatures": {
            "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.",
            "items": {
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            },
            "type": "array"
          },
          "subject": {
            "description": "DID of the creator receiving payment.",
            "format": "did",
            "type": "string"
          },
          "txnid": {
            "description": "Unique transaction identifier for deduplication. Typically a ULID or UUID assigned by the payment broker.",
            "maxLength": 64,
            "type": "string"
          }
        },
        "required": [
          "subject",
          "amount",
          "currency",
          "txnid",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "network.attested.payment.oneTime",
  "lexicon": 1
}
