Check Billing Status
Endpoint
https://api.betatel.com/api/billing/status
Method: GET
Description: Check the operational status of the billing service.
Let’s Dive Into the Code!
Choose your preferred programming language and use the provided examples to integrate the get check billing status.
- cUrl
- Python
- Node.js
- PHP
- Java
- C#
Example - cURL
curl --location 'https://api.betatel.com/api/billing/status'
Example - Python
import http.client
conn = http.client.HTTPSConnection("api.betatel.com")
payload = ''
conn.request("GET", "/api/billing/status", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Example - Node.js
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://api.betatel.com/api/billing/status'
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Example - PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.betatel.com/api/billing/status',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'x-api-key: ••••••'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Example - Java
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://api.betatel.com/api/billing/status")
.asString();
Example - C#
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.betatel.com/api/billing/status");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Response
JSON Schema:
{
"status": "operational",
"version": "1.0.3",
"uptime": "3d 5h 12m"
}
Field | Type | Description |
---|---|---|
status | string | Indicates the current operational status of the service (e.g., "operational"). |
version | string | The current version of the billing service API (e.g., "1.0.3"). |
uptime | string | The duration for which the service has been operational (e.g., "3d 5h 12m"). |