Set auto top-up
curl --request PUT \
--url https://api.fibre.dev/v1/billing/auto-topup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"threshold_usd": 2500,
"amount_usd": 2502.5
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true, threshold_usd: 2500, amount_usd: 2502.5})
};
fetch('https://api.fibre.dev/v1/billing/auto-topup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.fibre.dev/v1/billing/auto-topup"
payload = {
"enabled": True,
"threshold_usd": 2500,
"amount_usd": 2502.5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"ok": true
}{
"error": "<string>",
"code": "invalid_request",
"request_id": "<string>",
"docs_url": "<string>"
}{
"error": "<string>",
"code": "invalid_request",
"request_id": "<string>",
"docs_url": "<string>"
}Billing
Set auto top-up
Turn automatic top-up on or off, with the balance that triggers it and the amount it adds.
PUT
/
v1
/
billing
/
auto-topup
Set auto top-up
curl --request PUT \
--url https://api.fibre.dev/v1/billing/auto-topup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"threshold_usd": 2500,
"amount_usd": 2502.5
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true, threshold_usd: 2500, amount_usd: 2502.5})
};
fetch('https://api.fibre.dev/v1/billing/auto-topup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.fibre.dev/v1/billing/auto-topup"
payload = {
"enabled": True,
"threshold_usd": 2500,
"amount_usd": 2502.5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"ok": true
}{
"error": "<string>",
"code": "invalid_request",
"request_id": "<string>",
"docs_url": "<string>"
}{
"error": "<string>",
"code": "invalid_request",
"request_id": "<string>",
"docs_url": "<string>"
}