Change the subscription plan

View as Markdown

Move an active AI Plus or AI Pro subscription to another plan. A higher tier or a longer billing period applies now and invoices the prorated difference; paymentUrl is set when that invoice needs the customer to pay before the change applies. Any other change takes effect at the current period end. Sending the current plan cancels a scheduled change.

Authentication

AuthorizationBearer

User bearer token: Clerk session JWT, Clerk OAuth access token, or Clerk API key

Request

This endpoint expects an object.
planenumRequired

AI Plus or AI Pro plan to move to; the current plan cancels a scheduled change

Allowed values:

Response headers

X-RateLimit-Limitinteger

Requests allowed per client IP in the current rate-limit window.

X-RateLimit-Remaininginteger

Requests left before the tightest applicable rate-limit bucket rejects.

X-RateLimit-Resetinteger

Seconds until the exhausted rate-limit bucket admits another request; 0 when none is exhausted.

Response

OK
effectiveAtdatetime

When the plan takes effect: now, or the current period end

planenum
Plan the subscription moves to
Allowed values:
paymentUrlstring or nullOptionalformat: "uri"

Hosted invoice to pay when the upgrade’s prorated charge needs the customer; the upgrade applies only after it is paid. Absent when no payment is pending.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
406
Not Acceptable Error
409
Conflict Error
415
Unsupported Media Type Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error