Skip to navigation

Preview a Subscription Plan Change

View as Markdown

Show what POST /v1/billing/plan-changes would do for the same plan without changing anything: the amount charged on confirmation, when the plan takes effect, the recurring price after it, and the card on file. Refuses exactly what the plan change refuses.

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
amountDuelong

Amount charged on confirmation in the currency’s minor unit, after credit for unused time; 0 when the change waits for the period end

currencystring
ISO 4217 currency code.
effectiveAtdatetime

When the plan would take effect: now, or the current period end

recurringPriceobject
Recurring charge after the change
paymentMethodobject or nullOptional

Card Stripe charges; absent when no card is on file

prorationDatelong or nullOptional

Unix epoch-second timestamp to send on upgrade confirmation so Stripe charges this previewed proration; absent when the change does not prorate now

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