# FinOps Cost-Credit Period Ledger

> FinOps Cost-Credit Period Ledger is a paid API for AI agents from finops.halowerk.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-12-01).

Reconciles caller-supplied cloud cost charge and credit lines across defined reporting periods, bucketing amounts without float drift.

## Facts

- Endpoint: POST https://finops.halowerk.com/v1/cost-credit-period-ledger?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/finops-cost-credit-period-ledger-292a8efd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_II9TrgfWL75J5UFJzQSuz

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability finops-cost-credit-period-ledger-292a8efd -d '<json body>'
```

Example prompt: Reconcile these cloud cost lines for me — I have two periods (Q3: July 1 to Sep 30, Q4: Oct 1 to Dec 31 2024 as Unix timestamps) and three line items: a USD charge of 150000 minor units in Q3 (id 'chg001'), a USD charge of 200000 in Q4 (id 'chg002'), and a USD credit of 50000 in Q4 (id 'crd001', credit_for 'chg001'). Can you bucket these and show me the net per period without any float drift?

## When to prefer this

Use this endpoint when you need deterministic, float-safe reconciliation of cloud cost and credit lines across defined reporting periods using caller-normalized data, with no dependency on live cloud account access, tariff APIs, or external financial systems. Prefer it over general-purpose arithmetic or spreadsheet tools when you need auditable period bucketing with credit-to-charge linkage (credit_for) and want schema-enforced input validation at a fixed low per-call cost.

## Known failure modes

- HTTP 400 if input JSON fails schema validation (e.g. invalid id pattern, out-of-range timestamps, bad currency code, more than 12 lines or 6 periods)
- HTTP 400 if required fields (id, from, to, currency, amount_minor, kind) are missing from any line
- Unexpected unknown-domain results if period boundaries don't overlap any line timestamps — these are valid successful responses, not errors
- Float handling issues avoided by design via minor-unit string amounts, but caller must supply pre-normalized minor units

## How this service works

Reconcile supplied cloud cost lines and retrospective credits across reporting periods without float drift. Caller-supplied normalized records only. No actual cloud account, tariff lookup or financial action. Unknown domain evidence remains unknown. A schema-valid unknown is a successful result at the same fixed price. Invalid input raises native HTTP400 before settlement.

## Output

A structured ledger response bucketing each supplied charge and credit line into its matching reporting period(s), computing net amounts per period in minor units to avoid float drift. Lines that fall outside any defined period are flagged as unknown (schema-valid unknown is a successful result). The response reflects pure computation on caller-supplied data — no cloud account access or tariff lookup occurs.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "lines": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "id",
     "from",
     "to",
     "currency",
     "amount_minor",
     "kind"
    ],
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{1,16}$"
     },
     "to": {
      "type": "integer",
      "maximum": 4102444800,
      "minimum": 0
     },
     "from": {
      "type": "integer",
      "maximum": 4102444800,
      "minimum": 0
     },
     "kind": {
      "enum": [
       "charge",
       "credit"
      ]
     },
     "currency": {
      "type": "string",
      "pattern": "^[A-Z]{3}$"
     },
     "credit_for": {
      "anyOf": [
       {
        "type": "string",
        "pattern": "^[A-Za-z0-9_-]{1,16}$"
       },
       {
        "type": "null"
       }
      ]
     },
     "amount_minor": {
      "type": "string",
      "pattern": "^-?(0|[1-9][0-9]{0,11})$"
     }
    },
    "additionalProperties": false
   },
   "maxItems": 12,
   "minItems": 1
  },
  "periods": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "id",
     "from",
     "to"
    ],
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{1,16}$"
     },
     "to": {
      "type": "integer",
      "maximum": 4102444800,
      "minimum": 0
     },
     "from": {
      "type": "integer",
      "maximum": 4102444800,
      "minimum": 0
     }
    },
    "additionalProperties": false
   },
   "maxItems": 6,
   "minItems": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/finops-cost-credit-period-ledger-292a8efd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from finops.halowerk.com](https://www.zero.xyz/host/finops.halowerk.com/llms.txt)
