com.atiproto.subscription

atiproto.com

Documentation

A record representing a subscription from one user to another

main record

A record representing a subscription from one user to another

Record Key any Any valid record key

Properties

accessUntil string datetime Optional

Date until which the subscriber retains access after cancellation

amount integer Required

Subscription amount in cents (0 for free subscriptions)

minimum: 0
billingStartDate string datetime Required

First billing period, can be used to determine recurrence

cancelledAt string datetime Optional

Cancellation timestamp

createdAt string datetime Required

Creation timestamp

currency string Required

ISO 4217 currency code

maxLength: 3 bytes
interval string Required

Billing interval

maxLength: 64 bytes
Allowed: monthly, yearly
status string Required

Subscription status

maxLength: 64 bytes
Allowed: pending, active, past_due, cancelled, expired
subject string did Required

DID of the user being subscribed to

View raw schema
{
  "description": "A record representing a subscription from one user to another",
  "key": "any",
  "record": {
    "properties": {
      "accessUntil": {
        "description": "Date until which the subscriber retains access after cancellation",
        "format": "datetime",
        "type": "string"
      },
      "amount": {
        "description": "Subscription amount in cents (0 for free subscriptions)",
        "minimum": 0,
        "type": "integer"
      },
      "billingStartDate": {
        "description": "First billing period, can be used to determine recurrence",
        "format": "datetime",
        "type": "string"
      },
      "cancelledAt": {
        "description": "Cancellation timestamp",
        "format": "datetime",
        "type": "string"
      },
      "createdAt": {
        "description": "Creation timestamp",
        "format": "datetime",
        "type": "string"
      },
      "currency": {
        "description": "ISO 4217 currency code",
        "maxLength": 3,
        "type": "string"
      },
      "interval": {
        "description": "Billing interval",
        "enum": [
          "monthly",
          "yearly"
        ],
        "maxLength": 64,
        "type": "string"
      },
      "status": {
        "description": "Subscription status",
        "enum": [
          "pending",
          "active",
          "past_due",
          "cancelled",
          "expired"
        ],
        "maxLength": 64,
        "type": "string"
      },
      "subject": {
        "description": "DID of the user being subscribed to",
        "format": "did",
        "type": "string"
      }
    },
    "required": [
      "subject",
      "amount",
      "currency",
      "interval",
      "status",
      "billingStartDate",
      "createdAt"
    ],
    "type": "object"
  },
  "type": "record"
}
view object

View of a subscription record for use in API responses

Properties

accessUntil string datetime Optional

Date until which the subscriber retains access after cancellation

amount integer Required

Subscription amount in cents (0 for free subscriptions)

minimum: 0
billingStartDate string datetime Required

First billing period, can be used to determine recurrence

cancelledAt string datetime Optional

Cancellation timestamp

createdAt string datetime Required

Creation timestamp

currency string Required

ISO 4217 currency code

maxLength: 3 bytes
interval string Required

Billing interval

maxLength: 64 bytes
renewalDate string datetime Optional

Next scheduled renewal/billing date. Server-derived from the billing schedule; not stored in PDS. Omitted when not applicable (e.g. cancelled or unauthenticated views).

status string Required

Subscription status

maxLength: 64 bytes
subject string did Optional

DID of the user being subscribed to

uri string at-uri Required

AT-URI of the subscription record

View raw schema
{
  "description": "View of a subscription record for use in API responses",
  "properties": {
    "accessUntil": {
      "description": "Date until which the subscriber retains access after cancellation",
      "format": "datetime",
      "type": "string"
    },
    "amount": {
      "description": "Subscription amount in cents (0 for free subscriptions)",
      "minimum": 0,
      "type": "integer"
    },
    "billingStartDate": {
      "description": "First billing period, can be used to determine recurrence",
      "format": "datetime",
      "type": "string"
    },
    "cancelledAt": {
      "description": "Cancellation timestamp",
      "format": "datetime",
      "type": "string"
    },
    "createdAt": {
      "description": "Creation timestamp",
      "format": "datetime",
      "type": "string"
    },
    "currency": {
      "description": "ISO 4217 currency code",
      "maxLength": 3,
      "type": "string"
    },
    "interval": {
      "description": "Billing interval",
      "enum": [
        "monthly",
        "yearly"
      ],
      "maxLength": 64,
      "type": "string"
    },
    "renewalDate": {
      "description": "Next scheduled renewal/billing date. Server-derived from the billing schedule; not stored in PDS. Omitted when not applicable (e.g. cancelled or unauthenticated views).",
      "format": "datetime",
      "type": "string"
    },
    "status": {
      "description": "Subscription status",
      "enum": [
        "pending",
        "active",
        "past_due",
        "cancelled",
        "expired"
      ],
      "maxLength": 64,
      "type": "string"
    },
    "subject": {
      "description": "DID of the user being subscribed to",
      "format": "did",
      "type": "string"
    },
    "uri": {
      "description": "AT-URI of the subscription record",
      "format": "at-uri",
      "type": "string"
    }
  },
  "required": [
    "uri",
    "amount",
    "currency",
    "interval",
    "status",
    "billingStartDate",
    "createdAt"
  ],
  "type": "object"
}

Lexicon Garden

@