com.atiproto.payment.subscription.validate

Validate that the authenticated user (as the sender/subscriber) has an active, Stripe-verified subscription. Looks up by subscriptionUri (a specific subscription record) or subject (recipient DID). These are mutually exclusive; subscriptionUri takes precedence.

Repository @atiproto.com did:plc:4x5dcv6u4wlkjcssto7f22nu namespace authority
Details · query
Kindquery
Authoritysubscription.payment.atiproto.com
Indexed
cid bafyreic26enay5exir6ek4uzh3v7kw2yhldes5ezsb4gkzdoeqyaxhnkje

Checks

Valid Lint pass
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Validate that the authenticated user (as the sender/subscriber) has an active, Stripe-verified subscription. Looks up by subscriptionUri (a specific subscription record) or subject (recipient DID). These are mutually exclusive; subscriptionUri takes precedence.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "amount": {
              "description": "Subscription amount in cents",
              "type": "integer"
            },
            "currency": {
              "description": "Currency of the subscription",
              "maxLength": 3,
              "type": "string"
            },
            "reason": {
              "description": "If invalid, reason for rejection",
              "maxLength": 1024,
              "type": "string"
            },
            "valid": {
              "description": "Whether the authed sender has an active, verified subscription",
              "type": "boolean"
            }
          },
          "required": [
            "valid"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "amount": {
            "description": "Expected subscription amount in cents. If omitted, only checks that a subscription exists.",
            "type": "integer"
          },
          "subject": {
            "description": "DID of the creator being subscribed to. Ignored if subscriptionUri is provided.",
            "format": "did",
            "type": "string"
          },
          "subscriptionUri": {
            "description": "AT-URI of a specific subscription record. Takes precedence over subject.",
            "format": "at-uri",
            "type": "string"
          }
        },
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "com.atiproto.payment.subscription.validate",
  "lexicon": 1
}