#
Balance
This endpoint allows you to check the remaining credit balance of your API account. It returns the available funds that can be used for future top-up transactions.
This balance reflects your business account, not the prepaid balance of individual end customers.
#
Send a Request
To retrieve your account balance, send a POST request to the /get-balance endpoint.
#
Code Samples
#
Staging
curl -X POST "https://api-staging.reincarcareprepay.ro/v1/get-balance" \
-H "X-Authorization: [STAGING_API_KEY]" \
-H "Content-Type: application/json"
try {
const res = await fetch("https://api-staging.reincarcareprepay.ro/v1/get-balance", {
method: "POST",
headers: {
"X-Authorization": "[STAGING_API_KEY]",
"Content-Type": "application/json"
}
})
const json = await res.json()
console.log(json)
} catch(err) {
console.log(err)
}
<?php
$url = "https://api-staging.reincarcareprepay.ro/v1/get-balance";
$apiKey = "[STAGING_API_KEY]";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"X-Authorization: $apiKey",
"Content-Type: application/json"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
#
Production
curl -X POST "https://api.reincarcareprepay.ro/v1/get-balance" \
-H "X-Authorization: [PROD_API_KEY]" \
-H "Content-Type: application/json"
try {
const res = await fetch("https://api.reincarcareprepay.ro/v1/get-balance", {
method: "POST",
headers: {
"X-Authorization": "[PROD_API_KEY]",
"Content-Type": "application/json"
}
})
const json = await res.json()
console.log(json)
} catch(err) {
console.log(err)
}
<?php
$url = "https://api.reincarcareprepay.ro/v1/get-balance";
$apiKey = "[PROD_API_KEY]";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"X-Authorization: $apiKey",
"Content-Type: application/json"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
The endpoint returns:
{
"balance": 1234,
"currency": "EUR"
}