Change the plan
Apply a plan change quoted by the preview. Echo the preview’s prorationDate so the amount charged matches the quote. An upgrade charges the prorated difference on the saved card now and the response carries the new per-cycle amount; a downgrade is scheduled for the current period end (effectiveAt) and charges nothing today. Idempotent on (subscription, target plan, prorationDate). Same plan, a non-active subscription, a different currency, or a different billing interval return 400.
prorationDate): retrying the same request does not charge twice. Same plan, a subscription that is not active or trialing, a different currency, or a different billing interval return 400.subscription.updated fires right away. An upgrade’s prorated charge also sends checkout.session.completed and subscription.renewed on AgentaOS’s next check. A downgrade sends a second subscription.updated when the new plan takes over at the period end. See Which action fires which event.Authorizations
Your secret key, from app.agentaos.ai -> Settings -> Developers -> API Keys. The key's prefix is both its identity and its environment: sk_test_... (sandbox, free, no verification) or sk_live_... (real money, requires business verification). A missing or invalid key returns 401.
Path Parameters
Subscription id.
Body
Response
The applied change. Shape depends on direction.
- Upgrade applied
- Downgrade scheduled
- Pending downgrade reverted