curl --request POST \
--url https://orbitlab.dev/api/v1/checkout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"planId": "<string>",
"domain": "<string>",
"label": "<string>",
"quantity": 123,
"renew": true
}
],
"mobileMoneyNetwork": "<string>",
"mobileMoneyPhone": "<string>",
"enableAutopay": true,
"appliedPromoCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>"
}
'import requests
url = "https://orbitlab.dev/api/v1/checkout"
payload = {
"items": [
{
"planId": "<string>",
"domain": "<string>",
"label": "<string>",
"quantity": 123,
"renew": True
}
],
"mobileMoneyNetwork": "<string>",
"mobileMoneyPhone": "<string>",
"enableAutopay": True,
"appliedPromoCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>"
}
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({
items: [
{
planId: '<string>',
domain: '<string>',
label: '<string>',
quantity: 123,
renew: true
}
],
mobileMoneyNetwork: '<string>',
mobileMoneyPhone: '<string>',
enableAutopay: true,
appliedPromoCodeId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
idempotencyKey: '<string>'
})
};
fetch('https://orbitlab.dev/api/v1/checkout', 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://orbitlab.dev/api/v1/checkout",
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([
'items' => [
[
'planId' => '<string>',
'domain' => '<string>',
'label' => '<string>',
'quantity' => 123,
'renew' => true
]
],
'mobileMoneyNetwork' => '<string>',
'mobileMoneyPhone' => '<string>',
'enableAutopay' => true,
'appliedPromoCodeId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'idempotencyKey' => '<string>'
]),
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://orbitlab.dev/api/v1/checkout"
payload := strings.NewReader("{\n \"items\": [\n {\n \"planId\": \"<string>\",\n \"domain\": \"<string>\",\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"renew\": true\n }\n ],\n \"mobileMoneyNetwork\": \"<string>\",\n \"mobileMoneyPhone\": \"<string>\",\n \"enableAutopay\": true,\n \"appliedPromoCodeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\"\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://orbitlab.dev/api/v1/checkout")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"planId\": \"<string>\",\n \"domain\": \"<string>\",\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"renew\": true\n }\n ],\n \"mobileMoneyNetwork\": \"<string>\",\n \"mobileMoneyPhone\": \"<string>\",\n \"enableAutopay\": true,\n \"appliedPromoCodeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://orbitlab.dev/api/v1/checkout")
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 \"items\": [\n {\n \"planId\": \"<string>\",\n \"domain\": \"<string>\",\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"renew\": true\n }\n ],\n \"mobileMoneyNetwork\": \"<string>\",\n \"mobileMoneyPhone\": \"<string>\",\n \"enableAutopay\": true,\n \"appliedPromoCodeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"error": "<unknown>"
}{
"error": "<unknown>"
}{
"error": "<unknown>"
}{
"error": "<unknown>"
}Create an order and start payment
Creates an order for plans, domains or renewals. Card payments return a payment_url; Mobile Money sends a payment prompt to the phone. Free orders are provisioned immediately. Send an Idempotency-Key header to make retries safe.
CLI: orbitlab buy …
curl --request POST \
--url https://orbitlab.dev/api/v1/checkout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"planId": "<string>",
"domain": "<string>",
"label": "<string>",
"quantity": 123,
"renew": true
}
],
"mobileMoneyNetwork": "<string>",
"mobileMoneyPhone": "<string>",
"enableAutopay": true,
"appliedPromoCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>"
}
'import requests
url = "https://orbitlab.dev/api/v1/checkout"
payload = {
"items": [
{
"planId": "<string>",
"domain": "<string>",
"label": "<string>",
"quantity": 123,
"renew": True
}
],
"mobileMoneyNetwork": "<string>",
"mobileMoneyPhone": "<string>",
"enableAutopay": True,
"appliedPromoCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>"
}
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({
items: [
{
planId: '<string>',
domain: '<string>',
label: '<string>',
quantity: 123,
renew: true
}
],
mobileMoneyNetwork: '<string>',
mobileMoneyPhone: '<string>',
enableAutopay: true,
appliedPromoCodeId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
idempotencyKey: '<string>'
})
};
fetch('https://orbitlab.dev/api/v1/checkout', 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://orbitlab.dev/api/v1/checkout",
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([
'items' => [
[
'planId' => '<string>',
'domain' => '<string>',
'label' => '<string>',
'quantity' => 123,
'renew' => true
]
],
'mobileMoneyNetwork' => '<string>',
'mobileMoneyPhone' => '<string>',
'enableAutopay' => true,
'appliedPromoCodeId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'idempotencyKey' => '<string>'
]),
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://orbitlab.dev/api/v1/checkout"
payload := strings.NewReader("{\n \"items\": [\n {\n \"planId\": \"<string>\",\n \"domain\": \"<string>\",\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"renew\": true\n }\n ],\n \"mobileMoneyNetwork\": \"<string>\",\n \"mobileMoneyPhone\": \"<string>\",\n \"enableAutopay\": true,\n \"appliedPromoCodeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\"\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://orbitlab.dev/api/v1/checkout")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"planId\": \"<string>\",\n \"domain\": \"<string>\",\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"renew\": true\n }\n ],\n \"mobileMoneyNetwork\": \"<string>\",\n \"mobileMoneyPhone\": \"<string>\",\n \"enableAutopay\": true,\n \"appliedPromoCodeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://orbitlab.dev/api/v1/checkout")
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 \"items\": [\n {\n \"planId\": \"<string>\",\n \"domain\": \"<string>\",\n \"label\": \"<string>\",\n \"quantity\": 123,\n \"renew\": true\n }\n ],\n \"mobileMoneyNetwork\": \"<string>\",\n \"mobileMoneyPhone\": \"<string>\",\n \"enableAutopay\": true,\n \"appliedPromoCodeId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"error": "<unknown>"
}{
"error": "<unknown>"
}{
"error": "<unknown>"
}{
"error": "<unknown>"
}Autorisations
API token (olab_…) created in Settings → API tokens or with orbitlab login.
En-têtes
Organization to act on (id or slug) for tokens that can access several organizations. Defaults to your first organization.
Corps
Show child attributes
Show child attributes
Defaults to mobile_money, the only method that can collect payment. Card payments are unavailable: credit_card is accepted for free orders only.
mobile_money, credit_card Provider code, e.g. VODACOM_MPESA_COD (Mobile Money).
Phone number (Mobile Money).
Charge in USD or the local currency. Defaults to local.
USD, local Save the Mobile Money number for automatic renewals.
Promo code id from the validate endpoint.
Show child attributes
Show child attributes
Alternative to the Idempotency-Key header.
Language of the payment page.
fr, en Réponse
orderId, paymentMethod, provider and, for card payments, payment_url.
The response is of type object.
Cette page vous a-t-elle été utile ?