Responses

marketplace.call and callEndpoint resolve to the upstream JSON body after a successful paid request.

const data = await client.marketplace.call<{ summary: string }>({
  path: "/p/demo-api/summarize",
  method: "POST",
  body: { text: "..." },
});

console.log(data.summary);

Failures

Non-OK responses throw APIError (or payment-related SDK errors). See Errors.

Payment metadata

Marketplace success responses are typically the provider payload. Payment proof details are part of the x402 retry flow (not a separate receipt API on the client). For field shapes, see Payment proofs and cost.