{"openapi":"3.1.0","info":{"title":"Event Idempotency Replay","version":"1.0.0","description":"Distinguish new events, safe replays and conflicting payloads against previously accepted event keys and ordered incoming events.","contact":{"email":"jeremy@jeremycarter.ca"}},"servers":[{"url":"https://gptenv-x402-catalog.defcronyke.workers.dev"}],"paths":{"/event-idempotency-replay/v1/check":{"post":{"operationId":"event_idempotency_replay","summary":"Distinguish new events, safe replays and conflicting payloads against previously accepted event keys and ordered incoming events.","x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.04"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"maxItems":250,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120},"fingerprint":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}},"required":["key","fingerprint"],"additionalProperties":false}},"incoming":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":120},"fingerprint":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}},"required":["key","fingerprint"],"additionalProperties":false}}},"required":["accepted","incoming"],"additionalProperties":false},"example":{"accepted":[{"key":"invoice:1","fingerprint":"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"}],"incoming":[{"key":"invoice:1","fingerprint":"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"},{"key":"invoice:2","fingerprint":"cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"},{"key":"invoice:2","fingerprint":"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"},{"key":"invoice:2","fingerprint":"cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"}]}}}},"responses":{"200":{"description":"Service result","content":{"application/json":{"schema":{"type":"object"},"example":{"new_count":1,"replay_count":2,"conflict_count":1,"events":[{"index":0,"key":"invoice:1","status":"replay"},{"index":1,"key":"invoice:2","status":"new"},{"index":2,"key":"invoice:2","status":"conflict"},{"index":3,"key":"invoice:2","status":"replay"}]}}}},"400":{"description":"Invalid request"},"402":{"description":"x402 exact payment required on Base"},"503":{"description":"Payment unavailable"}}}}}}