curl --request GET \
--url https://sbx.api.easybilling.cloud/billing/api/accounts/prepaid-credits \
--header 'Authorization: Bearer <token>' \
--header 'trace-id: <trace-id>'import requests
url = "https://sbx.api.easybilling.cloud/billing/api/accounts/prepaid-credits"
headers = {
"trace-id": "<trace-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'trace-id': '<trace-id>', Authorization: 'Bearer <token>'}
};
fetch('https://sbx.api.easybilling.cloud/billing/api/accounts/prepaid-credits', 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://sbx.api.easybilling.cloud/billing/api/accounts/prepaid-credits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"trace-id: <trace-id>"
],
]);
$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://sbx.api.easybilling.cloud/billing/api/accounts/prepaid-credits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("trace-id", "<trace-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sbx.api.easybilling.cloud/billing/api/accounts/prepaid-credits")
.header("trace-id", "<trace-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sbx.api.easybilling.cloud/billing/api/accounts/prepaid-credits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["trace-id"] = '<trace-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"accountId": "a4d2ea0f-10b5-4d25-979c-8dc5ed325e5d",
"prepaidCredits": [
{
"id": "f21661f0-e909-4c18-b5ab-526b27fd6946",
"uom": "API",
"remainingBalance": 20000,
"totalBalance": 20000,
"version": 1
},
{
"id": "9d7da474-44fb-49c9-9cd1-87df06680ba4",
"uom": "Token",
"remainingBalance": 20000,
"totalBalance": 20000,
"version": 1
}
]
}List available prepaid credits for an account
Lists every unit of measure the account holds credit in, or the single one named by uom when that filter is supplied.
include is a comma-separated list of expansions. Only buckets is supported.
curl --request GET \
--url https://sbx.api.easybilling.cloud/billing/api/accounts/prepaid-credits \
--header 'Authorization: Bearer <token>' \
--header 'trace-id: <trace-id>'import requests
url = "https://sbx.api.easybilling.cloud/billing/api/accounts/prepaid-credits"
headers = {
"trace-id": "<trace-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'trace-id': '<trace-id>', Authorization: 'Bearer <token>'}
};
fetch('https://sbx.api.easybilling.cloud/billing/api/accounts/prepaid-credits', 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://sbx.api.easybilling.cloud/billing/api/accounts/prepaid-credits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"trace-id: <trace-id>"
],
]);
$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://sbx.api.easybilling.cloud/billing/api/accounts/prepaid-credits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("trace-id", "<trace-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sbx.api.easybilling.cloud/billing/api/accounts/prepaid-credits")
.header("trace-id", "<trace-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sbx.api.easybilling.cloud/billing/api/accounts/prepaid-credits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["trace-id"] = '<trace-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"accountId": "a4d2ea0f-10b5-4d25-979c-8dc5ed325e5d",
"prepaidCredits": [
{
"id": "f21661f0-e909-4c18-b5ab-526b27fd6946",
"uom": "API",
"remainingBalance": 20000,
"totalBalance": 20000,
"version": 1
},
{
"id": "9d7da474-44fb-49c9-9cd1-87df06680ba4",
"uom": "Token",
"remainingBalance": 20000,
"totalBalance": 20000,
"version": 1
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Query Parameters
Unit of measure name. Omit to list every unit of measure the account holds. When present, the value is trimmed and must be non-blank and at most 64 characters. A name may contain /; do not put it in the path. Lookup is case-insensitive; the response echoes the stored spelling, not the request's casing.
1 - 64Comma-separated expansions. Only buckets is supported. Null or blank means nothing is expanded. Unknown tokens are rejected.
Response
Prepaid credits returned successfully.
Response for both prepaid credit queries. The single-unit-of-measure lookup returns the same envelope with one element rather than a bare object, so a client that adds or drops the uom filter does not have to change how it parses the answer.
