Skip to content
Luna
Esc
↑↓navigate↵open⌘Jpreview

Choose a plan

Moves an organisation to another plan. The change takes effect at once and the answer has plan, or the plan needs a card first and the answer has the url of a Stripe Checkout page.

POST/_luna/orgs/{org}/billing/plan
Authorization
AuthorizationBearer token · headerrequired

An account key (la_…), an API key (lt_…) or a session token (ls_…). The scopes listed are the permissions the operation needs.

Scopes:billing:write
Path parameters
orgstringrequired

The organisation, by its slug.

Request body
requiredapplication/json
planstringrequired

The plan's name.

successUrlstringrequired

The http or https URL to return to after Stripe Checkout, when the plan needs one.

cancelUrlstringrequired

The http or https URL to return to when the person backs out of Stripe Checkout.

Responses
200

The plan now in effect, or where to pay for it.

planstring

The plan the organisation is on now, when the change took effect at once.

urlstring

The Stripe Checkout page to send the browser to, when the plan needs a card first. The plan changes once checkout completes.

default

The request failed. The status says how and error.message says why.

errorErrorDetailrequired
Show properties
codestring | null

A code for programs to branch on, when the error has one.

messagestringrequired

What went wrong, in a sentence a person can read.

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://luna.example.com/_luna/orgs/string/billing/plan' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "plan": "string",
  "successUrl": "string",
  "cancelUrl": "string"
}'
Response
{
  "plan": "string",
  "url": "string"
}

Was this page helpful?