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

Lexicon Garden

@