TypeScript SDK
PaymentRequiredResult
type PaymentRequiredResult = { responseBody: { accepts: Array<RequestedPaymentRequirements>; error: string; payer?: string; x402Version: number; }; responseHeaders: Record<string, string>; status: 402;};
The error response body containing payment requirements
type responseBody = { accepts: Array<RequestedPaymentRequirements>; error: string; payer?: string; x402Version: number;};
Response headers for the error response
type responseHeaders = Record<string, string>;
HTTP 402 - Payment Required, verification or processing failed or payment missing
type status = 402;