Skip to content

decodePaymentRequiredHeader

decodePaymentRequiredHeader(headerValue): X402PaymentRequiredResponse

Defined in: src/x402/encoding.ts:157

Decodes a PAYMENT-REQUIRED header value.

Parameters

headerValue

string

Returns

X402PaymentRequiredResponse

Throws

If the header is not valid base64 / JSON / object.