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
{
"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"
}