{"lexicon":1,"id":"money.atmosphere.app.setRecipientFeeShare","defs":{"main":{"type":"procedure","description":"Set a LOWER per-recipient app fee for this app (e.g. a creator on the app's own Pro plan keeps more of their revenue). The override must be at or below the app's configured fee and is applied as a minimum against config at charge time — it can only ever reduce the app's share. It affects future checkouts, subscription re-pricing, and pledge conversions; optionally it also lowers application_fee_percent on the app's RUNNING subscriptions for this recipient (lower-only per subscription, batch-capped). Requires app service-auth.","input":{"encoding":"application/json","schema":{"type":"object","required":["recipientDid","environment","feeShareBps"],"properties":{"recipientDid":{"type":"string","format":"did"},"environment":{"type":"string","knownValues":["test","live"],"maxLength":8},"feeShareBps":{"type":"integer","minimum":0,"maximum":10000,"description":"Basis points of gross this app takes for this recipient. Must be ≤ the app's configured feeShareBps for the environment."},"reason":{"type":"string","maxLength":64,"description":"App-chosen label for reconciliation (e.g. pro_plan). Private; echoed back in listRecipientFeeShares."},"sourceSubscriptionId":{"type":"string","maxLength":256,"description":"Optional audit pointer to the app-owned subscription justifying the discount."},"expiresAt":{"type":"string","format":"datetime","description":"Optional expiry; past it the override is ignored and fees return to the configured rate."},"applyToActiveSubscriptions":{"type":"boolean","default":false,"description":"Also lower application_fee_percent on the app's running subscriptions for this recipient (never raises; batch-capped — repeat while the output's hasMoreSubscriptions is true to drain)."}}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["recipientDid","environment","feeShareBps","baseFeeShareBps","appliedToSubscriptions","skippedSubscriptions"],"properties":{"recipientDid":{"type":"string","format":"did"},"environment":{"type":"string","knownValues":["test","live"],"maxLength":8},"feeShareBps":{"type":"integer","minimum":0,"maximum":10000},"baseFeeShareBps":{"type":"integer","minimum":0,"maximum":10000,"description":"The app's configured fee this override lowers from."},"appliedToSubscriptions":{"type":"integer","minimum":0},"skippedSubscriptions":{"type":"integer","minimum":0},"hasMoreSubscriptions":{"type":"boolean","description":"True when applyToActiveSubscriptions processed a full batch and more running subscriptions still carry the older fee — call again with the same feeShareBps until false."}}}},"errors":[{"name":"InvalidRecipient"},{"name":"InvalidFeeShare"},{"name":"InvalidExpiry"},{"name":"FeeShareAboveBase","description":"Overrides only lower fees; raise the configured fee through app settings + recipient approval instead."},{"name":"AppEnvironmentNotConfigured"}]}}}