Skip to main content

Plan changes

Upgrades and downgrades: the rules for what can become what, the proration configuration and the statistics of what actually changed.

CommandHTTPDescription
plan-changes listGET /v1/plan_changesList plan changes
plan-changes createPOST /v1/plan_changesRun a plan change
plan-changes getGET /v1/plan_changes/{id}Get a plan change
plan-changes config listGET /v1/plan_changes/configGet the plan-change configuration
plan-changes config updatePATCH /v1/plan_changes/configUpdate the plan-change configuration
plan-changes rules listGET /v1/plan_changes/rulesList plan-change rules
plan-changes rules createPOST /v1/plan_changes/rulesCreate a plan-change rule
plan-changes rules getGET /v1/plan_changes/rules/{id}Get a plan-change rule
plan-changes rules updatePATCH /v1/plan_changes/rules/{id}Update a plan-change rule
plan-changes rules deleteDELETE /v1/plan_changes/rules/{id}Delete a plan-change rule
plan-changes stats listGET /v1/plan_changes/statsPlan-change statistics

Examples​

--params carries query and path parameters (id, page, filters); --json carries the request body; --fields limits which fields come back — worth using on every list/get to save context. See Global flags for the full reference.

# List plan changes
kobana billing plan-changes list \
--fields "id,public_id,external_id,subscription_id,billing_account_id"

# Get a plan change
kobana billing plan-changes get --params '{"id": "PLAN_CHANGE_ID"}'

# Run a plan change
kobana billing plan-changes create \
--json '{"subscription_id": "SUBSCRIPTION_ID", "to_plan_id": "TO_PLAN_ID"}'

# Update the plan-change configuration
kobana billing plan-changes config update \
--json '{"allow_upgrade": true, "allow_downgrade": true, "upgrade_proration": "full_proration"}'

# Delete a plan-change rule
kobana billing plan-changes rules delete \
--params '{"id": "RULE_ID"}' \
--dry-run

Next steps​