curl --request POST \
--url https://api.streamskill.pro/v1/purchases/{orderId}/upgrade-viewers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target_viewers": 200,
"max_amount": 12.5
}
'import requests
url = "https://api.streamskill.pro/v1/purchases/{orderId}/upgrade-viewers"
payload = {
"target_viewers": 200,
"max_amount": 12.5
}
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({target_viewers: 200, max_amount: 12.5})
};
fetch('https://api.streamskill.pro/v1/purchases/{orderId}/upgrade-viewers', 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.streamskill.pro/v1/purchases/{orderId}/upgrade-viewers",
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([
'target_viewers' => 200,
'max_amount' => 12.5
]),
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.streamskill.pro/v1/purchases/{orderId}/upgrade-viewers"
payload := strings.NewReader("{\n \"target_viewers\": 200,\n \"max_amount\": 12.5\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.streamskill.pro/v1/purchases/{orderId}/upgrade-viewers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"target_viewers\": 200,\n \"max_amount\": 12.5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.streamskill.pro/v1/purchases/{orderId}/upgrade-viewers")
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 \"target_viewers\": 200,\n \"max_amount\": 12.5\n}"
response = http.request(request)
puts response.read_body{
"to_viewers": 200,
"remaining_seconds": 3600,
"amount": 12.5,
"currency": "usd",
"payment_id": 12346,
"status": "completed"
}Upgrade viewers
Increase an order’s viewer limit. Use max_amount to set the maximum charge.
curl --request POST \
--url https://api.streamskill.pro/v1/purchases/{orderId}/upgrade-viewers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"target_viewers": 200,
"max_amount": 12.5
}
'import requests
url = "https://api.streamskill.pro/v1/purchases/{orderId}/upgrade-viewers"
payload = {
"target_viewers": 200,
"max_amount": 12.5
}
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({target_viewers: 200, max_amount: 12.5})
};
fetch('https://api.streamskill.pro/v1/purchases/{orderId}/upgrade-viewers', 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.streamskill.pro/v1/purchases/{orderId}/upgrade-viewers",
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([
'target_viewers' => 200,
'max_amount' => 12.5
]),
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.streamskill.pro/v1/purchases/{orderId}/upgrade-viewers"
payload := strings.NewReader("{\n \"target_viewers\": 200,\n \"max_amount\": 12.5\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.streamskill.pro/v1/purchases/{orderId}/upgrade-viewers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"target_viewers\": 200,\n \"max_amount\": 12.5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.streamskill.pro/v1/purchases/{orderId}/upgrade-viewers")
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 \"target_viewers\": 200,\n \"max_amount\": 12.5\n}"
response = http.request(request)
puts response.read_body{
"to_viewers": 200,
"remaining_seconds": 3600,
"amount": 12.5,
"currency": "usd",
"payment_id": 12346,
"status": "completed"
}- Get a quote for the new total viewer limit.
- Send the same
target_viewersand the quotedamountasmax_amount. - Read the actual cost from
amountand the payment ID frompayment_id.
max_amount, the API returns 409 price_changed without applying the upgrade. Request a new quote before trying again. Omit max_amount or pass null to allow the upgrade without a spending limit.
The new viewer limit also applies to future renewals. The upgrade does not extend the order duration. In the response, status: "completed" refers to the upgrade payment; the original order can continue running.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The language of the response
en, ru Path Parameters
ID of the order to upgrade.
x >= 1Body
New total viewer limit. For example, send 200 to increase from 100 to 200 viewers. Must exceed the current limit and stay within the maximum allowed for the order.
200
Maximum amount you agree to pay, in the quoted currency. If the cost exceeds this limit, the API returns 409 price_changed without applying the upgrade. Omit or pass null for no spending limit.
x >= 012.5
Response
Viewer limit increased successfully.
New total viewer limit.
200
Remaining order time in seconds.
x >= 03600
Cost of the upgrade in the returned currency, including discounts.
x >= 0.0112.5
usd, rub "usd"
ID of the upgrade payment.
12346
Status of the upgrade payment, not the original order.
completed "completed"