{"uid":"cap_0FIUlZqo1blk8JrvU47uG","slug":"billed-basis-proration-transcript-verifier-635bc4be","name":"Billed-Basis Proration Transcript Verifier","description":"From the original billed flat price and chronological unbilled price changes, reconstruct flexible credit basis, exact rational unused credit, new-price debit and net; verify supplied claims. Quantity one, seconds, no tax/discount/real invoice validity or Stripe-cent rounding assertion. A schema-valid unknown is a successful result at the same fixed price. Invalid input raises native HTTP400 before settlement. Serialized input limit 16384 bytes; whole data response limit 32768 bytes.","url":"https://finops.halowerk.com/v1/billed-basis-proration-transcript?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"report":{"type":"object","required":["basis_minor","current_minor","credit","debit","net"],"properties":{"net":{"anyOf":[{"type":"object","required":["n","d"],"properties":{"d":{"type":"string","pattern":"^[1-9][0-9]{0,23}$","maxLength":24},"n":{"type":"string","pattern":"^-?(0|[1-9][0-9]{0,23})$","maxLength":25}},"additionalProperties":false},{"type":"null"}]},"debit":{"anyOf":[{"type":"object","required":["n","d"],"properties":{"d":{"type":"string","pattern":"^[1-9][0-9]{0,23}$","maxLength":24},"n":{"type":"string","pattern":"^-?(0|[1-9][0-9]{0,23})$","maxLength":25}},"additionalProperties":false},{"type":"null"}]},"credit":{"anyOf":[{"type":"object","required":["n","d"],"properties":{"d":{"type":"string","pattern":"^[1-9][0-9]{0,23}$","maxLength":24},"n":{"type":"string","pattern":"^-?(0|[1-9][0-9]{0,23})$","maxLength":25}},"additionalProperties":false},{"type":"null"}]},"basis_minor":{"anyOf":[{"type":"integer","maximum":1000000,"minimum":0},{"type":"null"}]},"current_minor":{"anyOf":[{"type":"integer","maximum":1000000,"minimum":0},{"type":"null"}]}},"additionalProperties":false},"change_at":{"type":"integer","maximum":1000000000,"minimum":0},"period_end":{"type":"integer","maximum":1000000000,"minimum":0},"period_start":{"type":"integer","maximum":1000000000,"minimum":0},"new_price_minor":{"type":"integer","maximum":1000000,"minimum":0},"unbilled_price_changes":{"type":"array","items":{"type":"object","required":["at","price_minor"],"properties":{"at":{"type":"integer","maximum":1000000000,"minimum":0},"price_minor":{"type":"integer","maximum":1000000,"minimum":0}},"additionalProperties":false},"maxItems":8},"original_billed_price_minor":{"anyOf":[{"type":"integer","maximum":1000000,"minimum":0},{"type":"null"}]}}},"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_NGXyq5Uv9N72AaHR9i_NN","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":"Reconstructs and verifies credit/debit proration arithmetic for a subscription price change mid-period, returning exact rational credit basis, unused credit, new-price debit, and net figures.","exampleAgentPrompt":"Can you verify my proration calculation for a subscription that was originally billed at 1200 minor units, with the billing period running from second 0 to second 86400, a price change at second 43200 to a new price of 1600 minor units, and my claimed report showing basis_minor 1200, current_minor 800, credit as 1/2, debit as 2/3, and net as 1/6?","exampleUseCases":[{"title":"Mid-period plan upgrade proration audit","prompt":"My customer upgraded their plan from $12/month to $16/month halfway through the billing period. The period runs from timestamp 1000000 to 2000000 and the change happened at 1500000. My system calculated a credit of 6000/10000 and a debit of 8000/10000 with a net of 2000/10000. Can you verify those proration figures are correct given the original billed price was 1200 minor units and the new price is 1600?"},{"title":"Multiple price changes verification","prompt":"We had two unbilled price changes during a billing cycle — one at timestamp 200000 moving to 900 minor units and another at 600000 moving to 1100 minor units. The period is 0 to 1000000, the original billed price was 800 minor units, and the new price at settlement is 1100. I need you to reconstruct and verify the exact rational credit basis, unused credit, debit, and net figures from my report."},{"title":"Subscription downgrade credit check","prompt":"A subscriber downgraded their plan mid-period — originally billed at 2000 minor units, new price is 1200. Period goes from timestamp 5000000 to 6000000 with the change at 5400000. My billing system reported a credit of 8000/10000 and a debit of 4800/10000 with net -3200/10000. Please reconstruct the proration transcript and tell me whether my numbers are correct."}],"resultDescription":"Returns a transcript object containing the reconstructed rational credit basis (n/d fractions), exact unused credit, new-price debit, and net proration values, along with a verification of the caller-supplied report claims. Schema-valid but indeterminate inputs return a successful result at the fixed price. Invalid inputs return HTTP 400 before any settlement.","failureModes":["HTTP 400 if input schema is invalid or values are out of allowed range","Serialized input exceeding 16384 bytes rejected","Response exceeding 32768 bytes truncated or rejected","Timestamps out of range (must be 0–1,000,000,000) cause validation failure","Price values out of range (0–1,000,000 minor units) cause rejection","More than 8 unbilled price changes in array causes rejection"],"whenToPreferThis":"Use this endpoint when you need exact rational (non-floating-point) proration arithmetic verified against a subscription billing event with one or more mid-period price changes, particularly in FinOps or SaaS billing pipelines where floating-point rounding errors are unacceptable. Prefer this over general-purpose calculators when you need a verifiable transcript of credit basis, unused credit, debit, and net with arbitrary-precision rational numbers.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-01T18:36:49.102Z","isFirstParty":false,"canonicalSlug":"billed-basis-proration-transcript-verifier-635bc4be"}