Skip to navigation

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; paymentClientSecret lets Stripe.js finish that payment in the page instead. Any other change takes effect at the current period end. Sending the current plan cancels a scheduled change. Any change resumes a subscription that was set to end at the period end.

Authentication

AuthorizationBearer

Your aVenture API key (https://aventure.vc/settings/api-keys) or OAuth access token

Request

This endpoint expects an object.
planstringRequired

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

prorationDatelong or nullOptional

Unix epoch-second timestamp from an upgrade preview that pins its prorated amount on confirmation; omit it when no upgrade preview applies

Response headers

X-RateLimit-LimitintegerOptional

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

X-RateLimit-RemainingintegerOptional

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

X-RateLimit-ResetintegerOptional

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

planstring
Plan the subscription moves to
paymentClientSecretstring or nullOptional

PaymentIntent client secret of the same pending invoice, for Stripe.js to complete authentication or payment in the page; set exactly when paymentUrl is.

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.

publishableKeystring or nullOptional

Stripe publishable key for Stripe.js; set with paymentClientSecret

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