List billing transactions
curl --request GET \
--url https://api.sazabi.com/v1/billing/transactionsimport requests
url = "https://api.sazabi.com/v1/billing/transactions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.sazabi.com/v1/billing/transactions', 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.sazabi.com/v1/billing/transactions",
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.sazabi.com/v1/billing/transactions"
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.sazabi.com/v1/billing/transactions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sazabi.com/v1/billing/transactions")
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{
"items": [
{
"id": "<string>",
"transactionType": "cycle_top_up",
"creditDelta": "<string>",
"direction": "credit",
"reason": "cycle_renewal",
"amount": "<string>",
"balanceAfter": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"billingInvoiceId": "<string>"
}
],
"pagination": {
"page": 123,
"limit": 123,
"total": 123,
"totalPages": 123,
"hasNext": true,
"hasPrev": true
}
}Billing
List billing transactions
List recent credit ledger transactions with pagination.
GET
https://api.sazabi.com/v1
/
billing
/
transactions
List billing transactions
curl --request GET \
--url https://api.sazabi.com/v1/billing/transactionsimport requests
url = "https://api.sazabi.com/v1/billing/transactions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.sazabi.com/v1/billing/transactions', 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.sazabi.com/v1/billing/transactions",
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.sazabi.com/v1/billing/transactions"
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.sazabi.com/v1/billing/transactions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sazabi.com/v1/billing/transactions")
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{
"items": [
{
"id": "<string>",
"transactionType": "cycle_top_up",
"creditDelta": "<string>",
"direction": "credit",
"reason": "cycle_renewal",
"amount": "<string>",
"balanceAfter": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"billingInvoiceId": "<string>"
}
],
"pagination": {
"page": 123,
"limit": 123,
"total": 123,
"totalPages": 123,
"hasNext": true,
"hasPrev": true
}
}Query Parameters
Organization to query transactions for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).
Minimum string length:
1Maximum number of transactions to return per page.
Required range:
1 <= x <= 100Page number for pagination (1-indexed).
Required range:
1 <= x <= 9007199254740991