curl --request GET \
--url https://api.example.com/v1/account/checkoutimport requests
url = "https://api.example.com/v1/account/checkout"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/account/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://api.example.com/v1/account/checkout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/account/checkout"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/account/checkout")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/account/checkout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"planVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan": {
"planId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"planVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"kind": "trial",
"name": "<string>",
"billingPeriod": "<string>",
"durationSeconds": 123,
"price": {
"amountMinor": 123,
"currency": "<string>"
},
"operations": [
"purchase"
],
"eligible": true,
"description": "<string>",
"sortOrder": 123,
"gracePeriodSeconds": 123,
"recurringCapable": true,
"configurableSquads": true,
"held": true,
"ineligibleReason": "<string>",
"trafficAllowanceBytes": 123,
"deviceLimit": 123
},
"operation": "purchase",
"currency": "<string>",
"providers": [
{
"provider": "<string>",
"currency": "<string>",
"recurring": true,
"amountMinor": 123
}
],
"applyWallet": true,
"quote": {
"currency": "<string>",
"subtotalMinor": 123,
"addonMinor": 123,
"discountMinor": 123,
"walletBalanceMinor": 123,
"walletAppliedMinor": 123,
"externalMinor": 123
},
"subscriptions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slot": 123,
"plan": "<string>",
"status": "<string>",
"label": "<string>",
"endsAt": "2023-11-07T05:31:56Z"
}
],
"targetRequired": true,
"multiSubscription": true,
"squads": {
"selection": "<string>",
"minimum": 123,
"configurable": true,
"offered": [
{
"squadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>"
}
],
"maximum": 123
},
"selectedSquadIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"squadSelection": {
"required": true,
"reason": "squad_selection_required"
},
"quoteAvailable": true,
"addons": [
{
"addonId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"addonVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"kind": "traffic",
"name": "<string>",
"maxQuantity": 123,
"proration": "<string>",
"price": {
"amountMinor": 123,
"currency": "<string>"
},
"description": "<string>",
"squadCount": 123,
"trafficBytes": 123,
"deviceSlots": 123
}
],
"selectedAddons": [
{
"addonVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123
}
],
"provider": "<string>",
"promoCode": "<string>",
"promoRejection": "promo_unknown",
"subscriptionId": "<string>",
"newSubscription": true,
"termsUrl": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}Get v1accountcheckout
The open checkout with a live quote. A customer has at most one, shared with the Telegram bot, so opening one in a browser supersedes one left open in a chat. 404 means none is open, which is an ordinary state rather than a failure.
curl --request GET \
--url https://api.example.com/v1/account/checkoutimport requests
url = "https://api.example.com/v1/account/checkout"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/account/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://api.example.com/v1/account/checkout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/account/checkout"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/account/checkout")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/account/checkout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"planVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan": {
"planId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"planVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"kind": "trial",
"name": "<string>",
"billingPeriod": "<string>",
"durationSeconds": 123,
"price": {
"amountMinor": 123,
"currency": "<string>"
},
"operations": [
"purchase"
],
"eligible": true,
"description": "<string>",
"sortOrder": 123,
"gracePeriodSeconds": 123,
"recurringCapable": true,
"configurableSquads": true,
"held": true,
"ineligibleReason": "<string>",
"trafficAllowanceBytes": 123,
"deviceLimit": 123
},
"operation": "purchase",
"currency": "<string>",
"providers": [
{
"provider": "<string>",
"currency": "<string>",
"recurring": true,
"amountMinor": 123
}
],
"applyWallet": true,
"quote": {
"currency": "<string>",
"subtotalMinor": 123,
"addonMinor": 123,
"discountMinor": 123,
"walletBalanceMinor": 123,
"walletAppliedMinor": 123,
"externalMinor": 123
},
"subscriptions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slot": 123,
"plan": "<string>",
"status": "<string>",
"label": "<string>",
"endsAt": "2023-11-07T05:31:56Z"
}
],
"targetRequired": true,
"multiSubscription": true,
"squads": {
"selection": "<string>",
"minimum": 123,
"configurable": true,
"offered": [
{
"squadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>"
}
],
"maximum": 123
},
"selectedSquadIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"squadSelection": {
"required": true,
"reason": "squad_selection_required"
},
"quoteAvailable": true,
"addons": [
{
"addonId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"addonVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"kind": "traffic",
"name": "<string>",
"maxQuantity": 123,
"proration": "<string>",
"price": {
"amountMinor": 123,
"currency": "<string>"
},
"description": "<string>",
"squadCount": 123,
"trafficBytes": 123,
"deviceSlots": 123
}
],
"selectedAddons": [
{
"addonVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123
}
],
"provider": "<string>",
"promoCode": "<string>",
"promoRejection": "promo_unknown",
"subscriptionId": "<string>",
"newSubscription": true,
"termsUrl": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"request_id": "<string>"
}Query Parameters
ru, en Response
Checkout
Show child attributes
Show child attributes
purchase, renew, upgrade, downgrade Show child attributes
Show child attributes
The exact application breakdown. Every figure is computed on the server, so the number a customer is asked to approve and the number they are charged cannot be arrived at two different ways.
Show child attributes
Show child attributes
The subscriptions this checkout could target.
Show child attributes
Show child attributes
A target must be named before this checkout can be confirmed.
False means the panel renders no picker at all.
Show child attributes
Show child attributes
Whether the server choice still stands between this checkout and a price. A plan that asks the customer to choose servers opens with required: true and no quote rather than failing; reason is the commerce vocabulary the panel already explains.
Show child attributes
Show child attributes
False while the quote is withheld; quote then carries only the currency.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Why the entered code does not apply. Present on a 200, not an error.
promo_unknown, promo_ineligible, promo_exhausted, promo_invalid