curl --request POST \
--url https://api.qumo-deploy.com/v1/billing/checkout-sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan_name": "Pay as you go"
}
'import requests
url = "https://api.qumo-deploy.com/v1/billing/checkout-sessions"
payload = { "plan_name": "Pay as you go" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({plan_name: 'Pay as you go'})
};
fetch('https://api.qumo-deploy.com/v1/billing/checkout-sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qumo-deploy.com/v1/billing/checkout-sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'plan_name' => 'Pay as you go'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.qumo-deploy.com/v1/billing/checkout-sessions"
payload := strings.NewReader("{\n \"plan_name\": \"Pay as you go\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.qumo-deploy.com/v1/billing/checkout-sessions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"plan_name\": \"Pay as you go\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qumo-deploy.com/v1/billing/checkout-sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"plan_name\": \"Pay as you go\"\n}"
response = http.request(request)
puts response.read_body{
"client_secret": "cs_live_a1B2c3D4e5F6g7H8_secret_9iJ0kL1mN2oP3qR4",
"publishable_key": "pk_live_51QxR7aLkdIwHu7ixAbCdEfGhIjKlMnOp"
}{
"error": "organization_id is required"
}{
"error": "organization_id is required"
}{
"error": "organization_id is required"
}{
"error": "organization_id is required"
}{
"error": "organization_id is required"
}Start a plan checkout
Opens an embedded Stripe Checkout session that subscribes the organization to Pay as you go, billed in arrears for relay egress, and returns the client secret to mount it with Stripe’s Payment Element. An organization that already has a live subscription is refused with 409.
curl --request POST \
--url https://api.qumo-deploy.com/v1/billing/checkout-sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan_name": "Pay as you go"
}
'import requests
url = "https://api.qumo-deploy.com/v1/billing/checkout-sessions"
payload = { "plan_name": "Pay as you go" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({plan_name: 'Pay as you go'})
};
fetch('https://api.qumo-deploy.com/v1/billing/checkout-sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qumo-deploy.com/v1/billing/checkout-sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'plan_name' => 'Pay as you go'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.qumo-deploy.com/v1/billing/checkout-sessions"
payload := strings.NewReader("{\n \"plan_name\": \"Pay as you go\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.qumo-deploy.com/v1/billing/checkout-sessions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"plan_name\": \"Pay as you go\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qumo-deploy.com/v1/billing/checkout-sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"plan_name\": \"Pay as you go\"\n}"
response = http.request(request)
puts response.read_body{
"client_secret": "cs_live_a1B2c3D4e5F6g7H8_secret_9iJ0kL1mN2oP3qR4",
"publishable_key": "pk_live_51QxR7aLkdIwHu7ixAbCdEfGhIjKlMnOp"
}{
"error": "organization_id is required"
}{
"error": "organization_id is required"
}{
"error": "organization_id is required"
}{
"error": "organization_id is required"
}{
"error": "organization_id is required"
}Authorizations
A personal access token (POST /v1/auth/tokens) or a machine
identity token (POST /v1/projects/{project_id}/identities/{identity_id}/tokens),
both prefixed qumo_pat_. A token's scopes cap what it can do; see
Scopes and permissions. A personal
token names no organization: on a route whose path names no project or
organization, pass ?organization_id=.
Query Parameters
The organization the request acts in. Required with a personal token or a session, which name no organization themselves; an identity token's organization is implied.
Body
The plan to subscribe to. Pay as you go is the only plan sold at checkout, and the default.
Pay as you go "Pay as you go"
Response
The checkout session was created.