# PaymentNotAllowedError

> The requirement's asset, network or recipient is not on the caller's allow list.

```ts
import { PaymentNotAllowedError } from 'x402-avm-js';
```

```ts
export class PaymentNotAllowedError extends X402AvmError {
  readonly field: 'asset' | 'network' | 'payTo';
  readonly value: string;

  constructor(field: 'asset' | 'network' | 'payTo', value: string) {
    super(`Refusing to pay: ${field} "${value}" is not in the allowed${field === 'payTo' ? 'PayTo' : field[0].toUpperCase() + field.slice(1) + 's'} list`, 'payment_not_allowed');
    this.field = field;
    this.value = value;
  }
}
```

The requirement's asset, network or recipient is not on the caller's allow list. Thrown before anything is signed.

Source: [src/errors.ts](https://github.com/x402-avm/x402-avm-js/blob/main/src/errors.ts#L72)

Source: https://x402-avm.github.io/reference/js/payment-not-allowed-error
