billing

Change Plan

The paid→paid path (Pro↔Business, monthly↔annual): Paddle swaps the existing subscription's price with immediate proration — never a second checkout. 202 because the local plan flips only when the resulting subscription.updated webhook lands; the console polls, like checkout.

post/v1/billing/change-plan

Request

  • Base URL: https://api.elaan.io (the document declares no server; this is the origin it was published from)
  • URL: https://api.elaan.io/v1/billing/change-plan
  • Auth: none declared

Headers

authorizationstring nullable

Request body

plan'free' | 'pro' | 'business' | 'scale' required

A subscription tier. The natural identity of a plan is its slug; the price lives in Paddle (per price id), and the limits live in this module's PLAN_LIMITS so a pricing change is a one-line edit, not a data migration.

period'monthly' | 'annual' required

How often a paid tier renews. Mirrors the pricing page's monthly/annual toggle; each (plan, period) pair maps to one Paddle price id.

Response

Successful Response

object required

Changes

No recorded changes to this operation across all 1 revision of this API.