API & MCP

Everything a person can do on Ledgerly Solar Payback Calculator, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Ledgerly Solar Payback Calculator

Year-by-year cash flow of a PV system: bill savings from the power you use yourself, feed-in income for the guaranteed years, ageing of the panels, running costs, an inverter replacement and an optional loan. Returns simple and discounted payback, NPV, IRR, the cost per kWh produced and a payback table for other price rises and self-consumption shares. Part of Ledgerly’s Solar & Heat.

Inputs of Ledgerly Solar Payback Calculator
FieldTypeDefaultDescription
currencytext"EUR"Currency
systemCostnumber14000System price incl. installation
subsidynumber0Subsidies and tax refunds
annualYieldKwhnumber7600Yield in the first year (kWh)
selfConsumptionPercentnumber30Used in the house (% of the yield). Without a battery often 25–35 %; the battery simulation gives your value.
electricityPricenumber0.35Electricity price per kWh
electricityPriceIncreasePercentnumber2Electricity price increase (% per year)
feedInTariffnumber0.078Feed-in payment per kWh
feedInYearsinteger20Years the feed-in payment is guaranteed. After that, exported energy earns nothing in this model.
degradationPercentnumber0.5Yield loss through ageing (% per year)
maintenancePerYearnumber150Insurance, metering and upkeep per year
costIncreasePercentnumber2Increase of the running costs (% per year)
inverterReplacementCostnumber1500Inverter replacement
inverterReplacementYearinteger15Inverter replaced in year (0 = never)
loanAmountnumber0Financed by a loan
loanRatePercentnumber4.5Loan interest rate (% per year)
loanYearsinteger10Loan term (years)
discountRatePercentnumber3Discount rate for NPV (% per year). What your money would earn elsewhere.
horizonYearsinteger25Years to compare

Example request

8 kWp for €14,000, 30 % self-use

curl -X POST https://ledgerlysolarpayback.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"currency":"EUR","systemCost":14000,"annualYieldKwh":7600,"selfConsumptionPercent":30,"electricityPrice":0.35,"feedInTariff":0.078}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "ledgerly-solar-payback": { "type": "http", "url": "https://ledgerlysolarpayback.usefulweb.app/mcp" }
  }
}