Skip to content

Provider: no idempotency key check — duplicate settlement on agent retry after network timeout #64

Description

@winsznx

Priority: P1 · Area: Provider middleware

x402Handler and MppChargeHandler settle on every request carrying a payment header, with no check against previously seen transaction hashes. An agent retry after a post-settlement network timeout triggers a second settle, invoking onSettled twice and risking double-counting in billing.

Proposed fix: Add an in-memory Set<string> (or pluggable SeenTxStore) per handler. Before settling, check if the decoded payment payload hash was already seen; if so, skip and return the cached response.


RouteDock Drip Wave 6 backlog.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions