# decodePaymentRequired

decodePaymentRequired in @provenanceauth/rails/x402, Rails. Decode + shape-check a `PAYMENT-REQUIRED` value.

## Signature

```ts
decodePaymentRequired(headerValue: string | null | undefined): X402PaymentRequired | null
```

## Parameters

- `headerValue` (string | null | undefined)

## Returns

`X402PaymentRequired | null`

Runs locally, with no request to the API.
