import type { ApifyClient } from '../apify_client.js';
/**
 * Registers an axios response error interceptor on the ApifyClient's internal
 * HTTP client. When a 402 response is received, the interceptor captures the
 * base64-encoded `payment-required` header, decodes it, and attaches the parsed
 * object to the error via a Symbol property.
 *
 * This is intentionally "hacky" — apify-client does not expose response headers
 * on errors, so we reach into the internal axios instance.
 */
export declare function registerPaymentRequiredInterceptor(apifyClient: ApifyClient): void;
/**
 * Builds an MCP response for a 402 Payment Required error.
 * Formats the response as a tool result containing the PaymentRequired JSON
 * per the x402 MCP transport spec, which allows clients to automatically handle the payment flow.
 */
export declare function buildPaymentRequiredResponse(errorOrMessage: unknown, precomputedPaymentData?: unknown): {
    _meta?: Record<string, unknown> | undefined;
    structuredContent?: {} | null | undefined;
    toolTelemetry?: import("../types.js").ToolTelemetryContext | undefined;
    content: {
        type: "text";
        text: string;
    }[];
    isError: boolean;
};
//# sourceMappingURL=payment_errors.d.ts.map