{"slug":"api-zfinia-com-x402-v1-payment-allocation-audit-d731aa","title":"Check that payment allocations are arithmetically consistent with the invoices a","host":"api.zfinia.com","method":"POST","resource":"https://api.zfinia.com/x402/v1/payment-allocation-audit","category":"code","description":"Check that payment allocations are arithmetically consistent with the invoices and payments they refer to. An over-allocated invoice and an over-allocated payment are reported separately because they are different events: money applied beyond what was owed, and money applied that was never received.","price_listed":0.18,"price_asked":0.18,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":4994,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"allocations":[{"amount":"500.01","invoice":"INV-1","payment":"PAY-1"},{"amount":"50.00","invoice":"INV-2","payment":"PAY-1"},{"amount":"100.00","invoice":"INV-3","payment":"PAY-2"},{"amount":"0","invoice":"INV-9","payment":"PAY-2"}],"invoices":[{"amount":"500.00","currency":"AUD","id":"INV-1"},{"amount":"250.00","currency":"AUD","id":"INV-2"},{"amount":"100.00","currency":"USD","id":"INV-3","status":"cancelled"}],"payments":[{"amount":"600.00","currency":"AUD","id":"PAY-1"},{"amount":"100.00","currency":"AUD","id":"PAY-2"}]},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"properties":{"allocations":{"items":{"additionalProperties":false,"properties":{"amount":{"type":["string","number"]},"invoice":{"maxLength":128,"type":"string"},"payment":{"maxLength":128,"type":"string"}},"required":["payment","invoice","amount"],"type":"object"},"maxItems":20000,"minItems":1,"type":"array"},"invoices":{"items":{"additionalProperties":false,"properties":{"amount":{"type":["string","number"]},"currency":{"maxLength":8,"type":"string"},"id":{"maxLength":128,"type":"string"},"status":{"maxLength":32,"type":"string"}},"required":["id","amount"],"type":"object"},"maxItems":20000,"minItems":1,"type":"array"},"payments":{"items":{"additionalProperties":false,"properties":{"amount":{"type":["string","number"]},"currency":{"maxLength":8,"type":"string"},"id":{"maxLength":128,"type":"string"},"received_on":{"maxLength":32,"type":"string"}},"required":["id","amount"],"type":"object"},"maxItems":20000,"minItems":1,"type":"array"}},"required":["invoices","payments","allocations"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-10-04","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.18,"price_match":true,"latency_ms":4994,"error":null}],"description_full":"Check that payment allocations are arithmetically consistent with the invoices and payments they refer to. An over-allocated invoice and an over-allocated payment are reported separately because they are different events: money applied beyond what was owed, and money applied that was never received. Also reports an unallocated remainder, an allocation to a cancelled invoice, and a cross-currency allocation, which converts at a rate the data does not state.","last_updated":"2026-10-04T08:38:24.838Z","schemes":["exact"]}