Skip to content

IdempotencyServerConfig

Defined in: src/x402/server.ts:135

Server-side idempotency configuration (M5-1). See CreateX402HandlerParams.idempotency.

Properties

fallbackTtlSeconds?

readonly optional fallbackTtlSeconds?: number

Defined in: src/x402/server.ts:148

Fallback record TTL in seconds when the authorization validBefore is unreadable. Default 86400.


inFlight?

readonly optional inFlight?: "await" | "reject"

Defined in: src/x402/server.ts:144

What to do when a concurrent request holds the in-flight lease for the same key. "reject" (default) returns a payment_in_progress 402 (the client retries and gets the cached result); "await" polls briefly for the twin to complete, then replays its response.


maxSnapshotBytes?

readonly optional maxSnapshotBytes?: number

Defined in: src/x402/server.ts:146

Max captured response body size for replay, in bytes. Default 65536 (64 KiB).


store?

readonly optional store?: IdempotencyStore | "none"

Defined in: src/x402/server.ts:137

The store, or "none" to disable. Default: a fresh in-memory bounded LRU.