{"lexicon":1,"id":"money.atmosphere.payment.listSubscriptions","defs":{"subscription":{"type":"object","required":["subscriptionId","paymentId","recipientDid","originatorDid","amount","currency","status","createdAt"],"properties":{"subscriptionId":{"type":"string","maxLength":256,"description":"Opaque ATM subscription relationship id. Stable across renewal and plan-change payment rows; prefer this for subscription management."},"paymentId":{"type":"string","maxLength":256,"description":"Current or initial ATM recurring payment row for this subscription relationship. It can change after amount or plan changes."},"recipientDid":{"type":"string","format":"did"},"originatorDid":{"type":"string","format":"did"},"amount":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"interval":{"type":"string","knownValues":["day","week","month","year"],"maxLength":16,"description":"Billing interval unit, matching money.atmosphere.price#recurring. Quarterly billing is interval=month with intervalCount=3."},"intervalCount":{"type":"integer","minimum":1,"maximum":1095,"description":"Number of interval units between billings. Defaults to 1."},"status":{"type":"string","knownValues":["completed","active","trialing","past_due","unpaid","canceled","externally_managed"],"maxLength":64,"description":"Subscription relationship status. Largely mirrors Stripe subscription statuses; open set (ATM may add states such as externally_managed)."},"metadata":{"type":"unknown","description":"Sanitized public display hints only. Raw app metadata, buyer notes, private messages, emails, addresses, and fulfillment data are not returned."},"entitlements":{"type":"array","maxLength":50,"items":{"type":"ref","ref":"com.atproto.repo.strongRef"}},"listing":{"type":"ref","ref":"com.atproto.repo.strongRef"},"createdAt":{"type":"string","format":"datetime"}}},"main":{"type":"query","description":"List active subscriptions for the authenticated payer. Requires a service-auth JWT signed by the payer DID.","parameters":{"type":"params","properties":{"status":{"type":"string","knownValues":["active","all"],"maxLength":16},"limit":{"type":"integer","minimum":1,"maximum":100,"default":50},"cursor":{"type":"string","maxLength":1024}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["subscriptions"],"properties":{"subscriptions":{"type":"array","items":{"type":"ref","ref":"#subscription"}},"cursor":{"type":"string","maxLength":1024}}}}}}}