Get billing overview
curl --request GET \
--url https://api.pnplayer.com/v1/api/billing \
--header 'X-Auth-Token: <api-key>'import requests
url = "https://api.pnplayer.com/v1/api/billing"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://api.pnplayer.com/v1/api/billing', 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.pnplayer.com/v1/api/billing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Auth-Token: <api-key>"
],
]);
$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.pnplayer.com/v1/api/billing"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Auth-Token", "<api-key>")
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.pnplayer.com/v1/api/billing")
.header("X-Auth-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pnplayer.com/v1/api/billing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Auth-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"videoCount": 123,
"bandwidthUsed": 123,
"storageUsed": 123,
"transcription": {
"minutes": 123,
"cost": 123
},
"billing": {
"id": 123,
"accountId": "<string>",
"planId": 123,
"status": "active",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"cancelAt": "<string>",
"canceledAt": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"plan": {
"id": 123,
"name": "Pro",
"priceCents": 123,
"currency": "USD",
"maxUsers": 123,
"maxStorageMb": 123,
"maxBandwidthMb": 123,
"createdAt": "2023-11-07T05:31:56Z"
},
"invoices": [
{
"id": 123,
"accountId": "<string>",
"billingId": 123,
"invoiceNumber": "INV-2026-001",
"amountCents": 123,
"currency": "<string>",
"status": "pending",
"invoiceUrl": "<string>",
"dueDate": "2023-12-25",
"paidAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"systemUsage": {
"data": [
{
"id": 123,
"accountId": "<string>",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"storageUsed": 123,
"bandwidthUsed": 123,
"minutesTranscribed": 123,
"totalPlays": 123,
"totalWatchTime": 123
}
],
"totals": {
"storageUsed": 123,
"bandwidthUsed": 123,
"minutesTranscribed": 123,
"totalPlays": 123,
"totalWatchTime": 123
}
},
"expansionPacks": [
{
"id": 123,
"accountId": "<string>",
"billingId": 123,
"catalogPackId": 123,
"name": "<string>",
"type": "storage",
"addedMb": 123,
"priceCents": 123,
"currency": "<string>",
"status": "requested",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"note": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"effectiveLimits": {
"storageMb": 123,
"bandwidthMb": 123
}
}
}{
"message": "Forbidden"
}Billing
Get billing overview
Returns the active plan, current usage, invoices, usage history, expansion packs and effective limits. Requires the READ_BILLING scope.
GET
/
v1
/
api
/
billing
Get billing overview
curl --request GET \
--url https://api.pnplayer.com/v1/api/billing \
--header 'X-Auth-Token: <api-key>'import requests
url = "https://api.pnplayer.com/v1/api/billing"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://api.pnplayer.com/v1/api/billing', 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.pnplayer.com/v1/api/billing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Auth-Token: <api-key>"
],
]);
$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.pnplayer.com/v1/api/billing"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Auth-Token", "<api-key>")
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.pnplayer.com/v1/api/billing")
.header("X-Auth-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pnplayer.com/v1/api/billing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Auth-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"videoCount": 123,
"bandwidthUsed": 123,
"storageUsed": 123,
"transcription": {
"minutes": 123,
"cost": 123
},
"billing": {
"id": 123,
"accountId": "<string>",
"planId": 123,
"status": "active",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"cancelAt": "<string>",
"canceledAt": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
},
"plan": {
"id": 123,
"name": "Pro",
"priceCents": 123,
"currency": "USD",
"maxUsers": 123,
"maxStorageMb": 123,
"maxBandwidthMb": 123,
"createdAt": "2023-11-07T05:31:56Z"
},
"invoices": [
{
"id": 123,
"accountId": "<string>",
"billingId": 123,
"invoiceNumber": "INV-2026-001",
"amountCents": 123,
"currency": "<string>",
"status": "pending",
"invoiceUrl": "<string>",
"dueDate": "2023-12-25",
"paidAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"systemUsage": {
"data": [
{
"id": 123,
"accountId": "<string>",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"storageUsed": 123,
"bandwidthUsed": 123,
"minutesTranscribed": 123,
"totalPlays": 123,
"totalWatchTime": 123
}
],
"totals": {
"storageUsed": 123,
"bandwidthUsed": 123,
"minutesTranscribed": 123,
"totalPlays": 123,
"totalWatchTime": 123
}
},
"expansionPacks": [
{
"id": 123,
"accountId": "<string>",
"billingId": 123,
"catalogPackId": 123,
"name": "<string>",
"type": "storage",
"addedMb": 123,
"priceCents": 123,
"currency": "<string>",
"status": "requested",
"startDate": "2023-12-25",
"endDate": "2023-12-25",
"note": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"effectiveLimits": {
"storageMb": 123,
"bandwidthMb": 123
}
}
}{
"message": "Forbidden"
}