Update Subscription Plan
Stripe Subscriptions
Update Subscription Plan
Change the user’s subscription to a different plan (upgrade or downgrade)
POST
Update Subscription Plan
Change the authenticated user’s subscription to a different plan. Proration is applied by default, adjusting the billing amount based on time remaining in the current period.Documentation Index
Fetch the complete documentation index at: https://devkit4ai.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
This endpoint requires end user authentication via HTTP Bearer Token with project scope.
Query Parameters
Use test mode credentials. Set to
false for production.Request Body
Stripe Price ID for the new plan (e.g.,
price_1ABC123def456)How to handle proration:
create_prorations- Apply credit/charge for prorated amountnone- No proration; new price applies next billing cyclealways_invoice- Invoice immediately for prorated amount
Response
Stripe subscription ID
Subscription status after update
New active Price ID
Human-readable confirmation message
Example Request
Example Response
Proration Behaviors
Proration Examples
| Scenario | Current | New | Proration |
|---|---|---|---|
| Upgrade | $10/mo | $20/mo | Charge difference prorated |
| Downgrade | $20/mo | $10/mo | Credit applied to next invoice |
| Same price | $10/mo | $10/mo | No change in billing |
Integration Example
Upgrade vs Downgrade UX
Error Responses
| Status | Description |
|---|---|
400 | Invalid price ID or incompatible plan |
401 | Unauthorized - Invalid or missing authentication |
404 | No active subscription to update |
404 | Project not found or Stripe not configured |
422 | Validation error - Invalid parameters |
Related Pages
Get My Subscription
Check current subscription
Create Checkout
Start new subscription
Cancel Subscription
End subscription
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Use test mode
Body
application/json

