Subscriptions
Preview a plan change
Needs the subscriptions:write scope, or a full-access key. About scopes
POST
/
api/v1/subscriptions/{id}/change-plan/previewAuthorization
AuthorizationRequiredBearer <token>
An API key: gpy_test_… or gpy_live_… (or an agent key, agk_…).
In: header
Request Body
application/jsonOptionalplan_idstring
Exactly one of plan_id / plan_code.
Format:
"uuid"plan_codestring
A plan code; its latest active version is used.
Minimum length:
1Maximum length: 200quantityAny properties in integer, string
prorationstring
create (default) bills the difference now; none switches and waits for the period.
Value in:
"create" | "none"whenstring
now (default) switches immediately; period_end stages the change for the renewal.
Value in:
"now" | "period_end"Path Parameters
idRequiredstring
Format:
"uuid"Header Parameters
Idempotency-Keystring
A unique value for this operation, chosen by you. A retry with the same key and the same body returns the first response instead of running again. The same key with a different body answers 409 idempotency_key_reused; a key whose first request is still running answers 409 idempotency_in_progress.
The proration that WOULD be applied. Nothing was written.