---
title: "x402 Plugin"
sidebarTitle: "x402 Payments"
description: "x402 payment protocol plugin for Eliza — enable HTTP 402-based micropayments for agent services."
---

The x402 plugin implements the [HTTP 402 Payment Required](https://www.x402.org/) protocol, enabling Eliza agents to handle micropayments for premium services and content access.

> **On-demand plugin.** This plugin is resolved from the remote elizaOS plugin registry and auto-installs when configured. It is not included in Eliza's bundled `plugins.json` index.

**Package:** `@elizaos/plugin-x402`

## Installation

```bash
eliza plugins install @elizaos/plugin-x402
```

## Configuration

### Enable via Features

```json
{
  "features": {
    "x402": true
  }
}
```

### Prerequisites

A configured blockchain wallet is required for payment processing. See the [Wallet Guide](/guides/wallet) for setup.

## How It Works

1. An external service responds with HTTP 402 and a payment request header
2. The x402 plugin intercepts the response and evaluates the payment request
3. If approved, it signs a payment transaction using the agent's wallet
4. The payment proof is attached to the retried request
5. The service verifies the payment and fulfills the request

## Features

- HTTP 402-based micropayment handling
- Pay-per-request agent service monetization
- Integrates with blockchain wallet for payment processing
- Supports EVM and Solana payment chains

## Related

- [Wallet Guide](/guides/wallet) — Wallet setup and management
- [EVM Plugin](/plugin-registry/defi/evm) — EVM chain interactions
- [Solana Plugin](/plugin-registry/defi/solana) — Solana interactions
