com.atiproto.subscription
A record representing a subscription from one user to another
Details · record, key any
| Kind | record |
|---|---|
| Record key | any |
| Authority | atiproto.com |
| Indexed |
Checks
Valid Lint pass{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"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": {
"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"
}
},
"id": "com.atiproto.subscription",
"lexicon": 1
}