Liftbay
API referenceBilling

Change plan

POST
/v1/orgs/{org}/billing/change-plan

Paid plan changes apply now: upgrades are charged prorated, downgrades are not refunded. Choosing Free cancels at the end of the period.

Authorization

cookielb_session<token>

Dashboard session cookie, set by the sign-in endpoints.

Path Parameters

org*string

Organization slug

Request Body

application/json
  1. body
plan*PlanId
Value in"free""indie""team"

Response Body

OK

application/json
  1. response
plan*
status*SubscriptionStatus
Value in"none""active""past_due""on_hold""cancelled"
currentPeriodStart*string
currentPeriodEnd*string|null
cancelAtPeriodEnd*boolean
earlyBirdFreeUntil*string|null
paymentMethod*|null
usage*
otaBandwidthCapReached*boolean
emergencyPublishesLeft*number|null
provider*string
Value in"fake""dodo"
curl -X POST "https://example.com/v1/orgs/string/billing/change-plan" \  -H "Content-Type: application/json" \  -d '{    "plan": "free"  }'
{  "plan": {    "id": "free",    "name": "string",    "priceCents": 0,    "currency": "string",    "interval": "month",    "description": "string",    "features": [      "string"    ],    "limits": {      "projects": 0,      "members": 0,      "otaPublishes": 0,      "otaBandwidthGb": 0    },    "offer": {      "name": "string",      "freeMonths": 0    }  },  "status": "none",  "currentPeriodStart": "string",  "currentPeriodEnd": "string",  "cancelAtPeriodEnd": true,  "earlyBirdFreeUntil": "string",  "paymentMethod": {    "brand": "string",    "last4": "string"  },  "usage": {    "projects": {      "used": 0,      "limit": 0    },    "members": {      "used": 0,      "limit": 0    },    "otaPublishes": {      "used": 0,      "limit": 0    },    "otaBandwidthGb": {      "used": 0,      "limit": 0    }  },  "otaBandwidthCapReached": true,  "emergencyPublishesLeft": 0,  "provider": "fake"}