{"lexicon":1,"id":"money.atmosphere.payment.cancelSubscription","defs":{"main":{"type":"procedure","description":"Cancel a subscription on behalf of the authenticated payer. Requires a service-auth JWT signed by the payer DID; the JWT iss must match the subscription's payerDid.","input":{"encoding":"application/json","schema":{"type":"object","required":["paymentId"],"properties":{"paymentId":{"type":"string","maxLength":128},"reason":{"type":"string","maxLength":256}}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["paymentId","status","cancelledAt"],"properties":{"paymentId":{"type":"string","maxLength":128},"status":{"type":"string","maxLength":64},"cancelledAt":{"type":"string","format":"datetime"}}}},"errors":[{"name":"PaymentNotFound","description":"Subscription payment not found for this payer."},{"name":"NotASubscription","description":"Payment is not a subscription."},{"name":"SubscriptionSuperseded","description":"This subscription record was replaced by a newer subscription change."},{"name":"RecipientStripeAccountMissing","description":"Recipient has no connected processor account."},{"name":"StripeCancelFailed","description":"The processor cancellation call failed."},{"name":"SubscriptionCancelFailed","description":"The subscription could not be cancelled."}]}}}