Create Purchase
curl --request POST \
--url https://api.streamskill.pro/v1/purchases/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tarif": {
"id": 1,
"quantity": 1000,
"duration": 24
},
"channel": "twitch",
"interval": 10,
"lang": "en",
"comment": "Test comment",
"start": false
}
'import requests
url = "https://api.streamskill.pro/v1/purchases/create"
payload = {
"tarif": {
"id": 1,
"quantity": 1000,
"duration": 24
},
"channel": "twitch",
"interval": 10,
"lang": "en",
"comment": "Test comment",
"start": False
}
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({
tarif: {id: 1, quantity: 1000, duration: 24},
channel: 'twitch',
interval: 10,
lang: 'en',
comment: 'Test comment',
start: false
})
};
fetch('https://api.streamskill.pro/v1/purchases/create', 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/create",
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([
'tarif' => [
'id' => 1,
'quantity' => 1000,
'duration' => 24
],
'channel' => 'twitch',
'interval' => 10,
'lang' => 'en',
'comment' => 'Test comment',
'start' => false
]),
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/create"
payload := strings.NewReader("{\n \"tarif\": {\n \"id\": 1,\n \"quantity\": 1000,\n \"duration\": 24\n },\n \"channel\": \"twitch\",\n \"interval\": 10,\n \"lang\": \"en\",\n \"comment\": \"Test comment\",\n \"start\": false\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/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tarif\": {\n \"id\": 1,\n \"quantity\": 1000,\n \"duration\": 24\n },\n \"channel\": \"twitch\",\n \"interval\": 10,\n \"lang\": \"en\",\n \"comment\": \"Test comment\",\n \"start\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.streamskill.pro/v1/purchases/create")
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 \"tarif\": {\n \"id\": 1,\n \"quantity\": 1000,\n \"duration\": 24\n },\n \"channel\": \"twitch\",\n \"interval\": 10,\n \"lang\": \"en\",\n \"comment\": \"Test comment\",\n \"start\": false\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"price": 10,
"currency": "usd",
"created_at": 1640000000,
"order_type": "twitch_viewers",
"channel": "https://www.twitch.tv/twitch",
"status": "active",
"service": "twitch",
"parent": false,
"api": true,
"chatbot": false,
"tarif": 1
}{
"error_code": "unauthorized",
"name": "Your request was made with invalid credentials.",
"message": "Your request was made with invalid credentials.",
"code": 0,
"status": 401,
"type": "unauthorized_http_exception"
}{
"error_code": "validation_error",
"name": "The Channel field is required.",
"message": "The Channel field is required.",
"code": 0,
"status": 422,
"type": "validate_exception",
"errors": {
"channel": [
"The Channel field is required."
]
}
}Purchases
Create purchase
POST
/
purchases
/
create
Create Purchase
curl --request POST \
--url https://api.streamskill.pro/v1/purchases/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tarif": {
"id": 1,
"quantity": 1000,
"duration": 24
},
"channel": "twitch",
"interval": 10,
"lang": "en",
"comment": "Test comment",
"start": false
}
'import requests
url = "https://api.streamskill.pro/v1/purchases/create"
payload = {
"tarif": {
"id": 1,
"quantity": 1000,
"duration": 24
},
"channel": "twitch",
"interval": 10,
"lang": "en",
"comment": "Test comment",
"start": False
}
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({
tarif: {id: 1, quantity: 1000, duration: 24},
channel: 'twitch',
interval: 10,
lang: 'en',
comment: 'Test comment',
start: false
})
};
fetch('https://api.streamskill.pro/v1/purchases/create', 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/create",
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([
'tarif' => [
'id' => 1,
'quantity' => 1000,
'duration' => 24
],
'channel' => 'twitch',
'interval' => 10,
'lang' => 'en',
'comment' => 'Test comment',
'start' => false
]),
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/create"
payload := strings.NewReader("{\n \"tarif\": {\n \"id\": 1,\n \"quantity\": 1000,\n \"duration\": 24\n },\n \"channel\": \"twitch\",\n \"interval\": 10,\n \"lang\": \"en\",\n \"comment\": \"Test comment\",\n \"start\": false\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/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tarif\": {\n \"id\": 1,\n \"quantity\": 1000,\n \"duration\": 24\n },\n \"channel\": \"twitch\",\n \"interval\": 10,\n \"lang\": \"en\",\n \"comment\": \"Test comment\",\n \"start\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.streamskill.pro/v1/purchases/create")
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 \"tarif\": {\n \"id\": 1,\n \"quantity\": 1000,\n \"duration\": 24\n },\n \"channel\": \"twitch\",\n \"interval\": 10,\n \"lang\": \"en\",\n \"comment\": \"Test comment\",\n \"start\": false\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"price": 10,
"currency": "usd",
"created_at": 1640000000,
"order_type": "twitch_viewers",
"channel": "https://www.twitch.tv/twitch",
"status": "active",
"service": "twitch",
"parent": false,
"api": true,
"chatbot": false,
"tarif": 1
}{
"error_code": "unauthorized",
"name": "Your request was made with invalid credentials.",
"message": "Your request was made with invalid credentials.",
"code": 0,
"status": 401,
"type": "unauthorized_http_exception"
}{
"error_code": "validation_error",
"name": "The Channel field is required.",
"message": "The Channel field is required.",
"code": 0,
"status": 422,
"type": "validate_exception",
"errors": {
"channel": [
"The Channel field is required."
]
}
}Use Quote purchase to check the cost before ordering.
Authorizations
Query Parameters
Body
application/json
Stream language for AI Chatbots. Only applicable for AI Chatbots tariffs. See the list of supported languages below.
Available options:
auto, en, ru, uk, de, es, fr, it, pt, pl, tr, ar, zh, ja, ko, hi, th, vi, id, ms, tl, ca, da, nl, no, ro, sk, fi, sv, cs, el, bg, hu, zh-hk, other Example:
"en"
Response
OK