Create a subscription to a user. Returns a one-off cart with checkout URL.
Input
application/jsonamount
integer
Optional
Custom amount in cents (if pay-as-you-want enabled)
cartUri
stringat-uri
Optional
AT-URI of an existing cart to add this subscription to. If omitted, a new cart is created.
currency
string
Required
ISO 4217 currency code
maxLength: 3 bytesinterval
string
Required
Billing interval
maxLength: 64 bytesisPrivate
boolean
Optional
If true, the recipient (subject) is stored only in atiproto's private database and is omitted from the PDS subscription record.
redirectUrl
stringuri
Optional
URL to redirect to after checkout completes
subject
stringdid
Required
DID of the user to subscribe to
workflow
refcom.atiproto.actions#inboundWorkflow
Optional
Workflow callback envelope. Present on agent-driven callbacks; absent on initial calls.
Output
application/jsoncart
refcom.atiproto.cart#view
Optional
The created cart record (status: open)
cartUri
stringat-uri
Optional
URI of the cart record in PDS
checkoutUrl
stringuri
Optional
Checkout URL hosted by atiproto
subscription
refcom.atiproto.subscription#view
Optional
The created subscription record (status: pending)
subscriptionUri
stringat-uri
Optional
URI of the subscription record in PDS
workflow
refcom.atiproto.actions#outboundWorkflow
Optional
Workflow envelope. When present, the agent runs the actions and calls back. When absent, this is the final native result.
Try It
Requests are sent directly from your browser. Some servers may block requests due to CORS.
View raw schema
{
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"subject",
"currency",
"interval"
],
"properties": {
"amount": {
"type": "integer",
"description": "Custom amount in cents (if pay-as-you-want enabled)"
},
"cartUri": {
"type": "string",
"format": "at-uri",
"description": "AT-URI of an existing cart to add this subscription to. If omitted, a new cart is created."
},
"subject": {
"type": "string",
"format": "did",
"description": "DID of the user to subscribe to"
},
"currency": {
"type": "string",
"maxLength": 3,
"description": "ISO 4217 currency code"
},
"interval": {
"enum": [
"monthly",
"yearly"
],
"type": "string",
"maxLength": 64,
"description": "Billing interval"
},
"workflow": {
"ref": "com.atiproto.actions#inboundWorkflow",
"type": "ref",
"description": "Workflow callback envelope. Present on agent-driven callbacks; absent on initial calls."
},
"isPrivate": {
"type": "boolean",
"description": "If true, the recipient (subject) is stored only in atiproto's private database and is omitted from the PDS subscription record."
},
"redirectUrl": {
"type": "string",
"format": "uri",
"description": "URL to redirect to after checkout completes"
}
}
},
"encoding": "application/json"
},
"output": {
"schema": {
"type": "object",
"properties": {
"cart": {
"ref": "com.atiproto.cart#view",
"type": "ref",
"description": "The created cart record (status: open)"
},
"cartUri": {
"type": "string",
"format": "at-uri",
"description": "URI of the cart record in PDS"
},
"workflow": {
"ref": "com.atiproto.actions#outboundWorkflow",
"type": "ref",
"description": "Workflow envelope. When present, the agent runs the actions and calls back. When absent, this is the final native result."
},
"checkoutUrl": {
"type": "string",
"format": "uri",
"description": "Checkout URL hosted by atiproto"
},
"subscription": {
"ref": "com.atiproto.subscription#view",
"type": "ref",
"description": "The created subscription record (status: pending)"
},
"subscriptionUri": {
"type": "string",
"format": "at-uri",
"description": "URI of the subscription record in PDS"
}
}
},
"encoding": "application/json"
},
"description": "Create a subscription to a user. Returns a one-off cart with checkout URL."
}