{"uid":"cap_II9TrgfWL75J5UFJzQSuz","slug":"finops-cost-credit-period-ledger-292a8efd","name":"FinOps Cost-Credit Period Ledger","description":"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.","url":"https://finops.halowerk.com/v1/cost-credit-period-ledger?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Qzzfp-mCZmJSmv6orY3Vd","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Reconciles caller-supplied cloud cost charge and credit lines across defined reporting periods, bucketing amounts without float drift.","exampleAgentPrompt":"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?","exampleUseCases":[{"title":"Monthly cloud bill credit matching","prompt":"I have my cloud billing export for November and December — there's a retrospective credit in December that actually offsets a charge from November. Can you reconcile these cost and credit lines across the two periods for me and show me the net spend per month? I'll give you the line IDs, USD amounts in minor units, and the Unix timestamps for each period boundary."},{"title":"Quarterly FinOps period close","prompt":"We're closing Q1 and Q2 books. I have six cost lines and two credits to reconcile across those two quarters — all in USD minor units. Can you bucket all the charges and credits into the right period and give me a clean ledger showing net cost per quarter with no floating point issues?"},{"title":"Multi-currency cloud cost period allocation","prompt":"I've normalized our GCP and Azure exports into EUR and USD line items. I need to allocate three charges and one retrospective EUR credit across two reporting periods (Jan and Feb 2025, as epoch timestamps). Can you produce a reconciled ledger showing what each period nets out to in each currency?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-01T12:53:22.251Z","isFirstParty":false,"canonicalSlug":"finops-cost-credit-period-ledger-292a8efd"}