A record representing a subscription from one user to another
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: 0billingStartDate
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 bytesinterval
string
Required
Billing interval
maxLength: 64 bytesmonthly, yearlystatus
string
Required
Subscription status
maxLength: 64 bytespending, active, past_due, cancelled, expiredsubject
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"
}