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

Start a checkout

Starts a Stripe Checkout session that puts a card on file for the plan the organisation is on, and returns the URL to send the browser to. The card pays for usage, and for the plan’s fee when it has one. It answers 409 when the cluster does not bill through Stripe or the organisation already pays through Stripe.

POST/_luna/orgs/{org}/billing/checkout
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
successUrlstringrequired

The http or https URL to return to once payment is set up.

cancelUrlstringrequired

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

Responses
200

The Stripe Checkout page.

urlstringrequired

The page's URL. It works once and for a short while.

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/checkout' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "successUrl": "string",
  "cancelUrl": "string"
}'
Response
{
  "url": "string"
}

Was this page helpful?