createFacilitatorClient (facilitator/client.ts)

mesh · packages/mesh-x402/src/facilitator/client.ts · typescript · Apache-2.0
payments

Module exposing: createFacilitatorClient

// Source: https://github.com/MeshJS/mesh | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import { PaymentPayload } from "../types/payment-payload";
import { PaymentRequirements } from "../types/payment-requirements";
import { PaymentResponse } from "../types/payment-response";
import { VerifyResult } from "./verify";

/** Body of `POST /verify` and `POST /settle`. `paymentRequirements` must be the resource server's own record of the offer. */
export type FacilitatorRequest = {
  paymentPayload: PaymentPayload;
  paymentRequirements: PaymentRequirements;
};

export type FacilitatorClientOptions = {
  fetch?: typeof fetch;
  /** Extra headers on every call (e.g. auth, tracing). */


... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key