Skip to main content
POST
Upgrade Plan
Base URL: https://api.nozle.app/engine/api/v1. Change a customer’s current plan without checkout from a trusted backend. Auth: secret key only. Publishable keys are rejected.
string
required
External customer ID.
string
required
The plan code to upgrade the customer to.

Response

Nozle reads the customer’s current subscription and its plan. A customer with one current subscription uses it. With several, Nozle uses the customer’s own subscription (not owned by an Entity) when there is exactly one; otherwise the request returns 409 with subscription_required and changes nothing. The most recently started subscription is no longer picked for you. If the target plan’s yearly amount is above zero and at least the current plan’s yearly amount, the request returns 422 and nothing changes. This includes a change between two paid plans with the same price. Otherwise Nozle changes the plan and returns Core’s subscription response, {"subscription": {...}}, with Core’s status code. The 422 body:
The 409 body:
404 means the plan, the active subscription, or the active subscription’s plan was not found. A missing plan_code or customer_id returns 400. For customer self-service, use a signed preview and POST /checkout for a selected upgrade, or the end-of-period transition API for a scheduled downgrade. The current paid plan stays active until required payment is fulfilled. See Subscription self-service for the complete flow.
Also available to trusted backends as POST /subscriptions/change (alias). Do not expose either route to browser code.