/v1/payback
Payback period
Live testen
10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.
Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.
API-Key holenCode-Snippets
curl "https://api.oanor.com/npv-api/v1/payback" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/npv-api/v1/payback", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/npv-api/v1/payback");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/npv-api/v1/payback",
headers={"x-oanor-key": "oanor_test_..."}
)
Beispiel-Response
Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.
{
"data": {
"note": "Payback period is when cumulative cash flow recovers the initial outlay; the discounted version first discounts each flow at the given rate.",
"inputs": {
"initial": 1000,
"periods": 4,
"rate_pct": 10
},
"simple_recovered": true,
"discounted_recovered": true,
"simple_payback_years": 2.6,
"discounted_payback_years": 3.0513
},
"meta": {
"timestamp": "2026-06-04T18:38:01.266Z",
"request_id": "70b0deb5-1bc6-4a34-b3e6-f5ef23a34dbf"
},
"status": "ok",
"message": "Payback period",
"success": true
}