> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polygon.technology/llms.txt
> Use this file to discover all available pages before exploring further.

# x402 Autopay

> How to install and use the AutoPay Chromium extension for x402 micropayments in the browser.

AutoPay is a Chromium extension that lets you fund a wallet for browser-based
micropayments and automatically pays for any x402 API endpoint it encounters.
While x402 is primarily designed for agent-to-agent payments, AutoPay extends
that model to human users browsing the web.

A basic demo video of how it works is here:

<iframe width="560" height="315" src="https://www.youtube.com/embed/b3QbkMIaXao?si=005MS-9PSu3rzQkh" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />

## Install AutoPay

The extension is not yet available on the Chrome Web Store. Install it manually
using one of two approaches.

### Option A: Download zip

Download the latest release zip from [https://github.com/Swader/x402autopay/releases](https://github.com/Swader/x402autopay/releases) and unpack it.

### Option B: Clone and build

1. Clone the repository:

```bash theme={null}
git clone https://github.com/Swader/x402autopay
```

2. Install the dependencies:

```bash theme={null}
bun install
```

3. Build the extension:

```bash theme={null}
bun run build
```

### Load the extension in Chrome

Whichever approach you used, load the extension in Chrome:

1. Open the Extensions page in your browser.
2. Enable **Developer mode**.
3. Click **Load unpacked**.
4. Select the `dist` folder: either the one created by `bun run build`, or the
   folder you unpacked from the zip file.

## Use AutoPay

A video walkthrough is also available:

<iframe width="560" height="315" src="https://www.youtube.com/embed/p8JiGMhMhGo?si=MDstP0ZqsSPfkbuA" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />

On first use, AutoPay prompts you to import or create a wallet and fund it.

<Note>Screenshot placeholder: wallet setup screen.</Note>

Set a passphrase to encrypt the wallet. The wallet stays unlocked for 15 minutes
by default.

To back up the wallet, click **Back Up**, enter your passphrase, and store the
displayed private key in a secure location.

Fund the wallet by sending USDC on Polygon to the displayed address. The balance
refreshes automatically, or you can click **Refresh** to update it manually.

<Note>Screenshot placeholder: wallet funding screen.</Note>

When the extension detects a 402 Payment Required response, it shows an approval
popup. Approve the payment and optionally set a "no ask" threshold for that site
so future payments below that amount are approved automatically.

Policies are configured per site and per currency.

<Note>Screenshot placeholder: payment approval screen.</Note>

View all site policies and payment history in the extension popup.

<Note>Screenshot placeholder: policies and history screen.</Note>

## Planned Features

* In-extension on-ramps to buy USDC without leaving the popup
* Pre-emptive site policy configuration before encountering a paywall
* [x402 V2](https://github.com/coinbase/x402/pull/446) support for fiat payments

To suggest improvements, open an issue or PR on the
[source repo](https://github.com/swader/autopay).
