Skip to content

Interface: FacilitatorClientOptions ​

Defined in: packages/x402-client/src/facilitator.ts:10

Properties ​

apiKey? ​

ts
apiKey?: string | (() => string | Promise<string>);

Defined in: packages/x402-client/src/facilitator.ts:17

Optional API key for the facilitator's authenticated endpoints (/v2/verify, /v2/settle). When set, it's sent as Authorization: Bearer <apiKey> on those requests; /v2/supported is unauthenticated and never receives it. A string or an async getter.


supportedTtlMs? ​

ts
supportedTtlMs?: number;

Defined in: packages/x402-client/src/facilitator.ts:29

How long a /v2/supported response is reused, in milliseconds. Default five minutes; 0 fetches every time.

It is cached because merchants configure from it — the synchronizer, the instrument admin, the transfer method — and those are deployment facts that change when the facilitator is redeployed, not per request. Without a cache every challenge would carry a round trip to learn what it already knew.


timeoutMs? ​

ts
timeoutMs?: number;

Defined in: packages/x402-client/src/facilitator.ts:19

Abort a request that exceeds this many ms. Omit for no timeout.