# Build x402 Payment Flows

HTTP 402 payment flows are hard to inspect and assemble safely. This skill helps Claude, Codex, and Claude Code plan custody-free x402 payments and monetize APIs.

## Install

```bash
npx skillstore add internet-court/x402
```

## Metadata

- Status: approved
- Slug: internet-court-x402
- Skillstore revision: r1
- Version status: missing
- Tree hash: 3fa9bb11ad27998a811645f2efc138a5ba5c20e4569d6a237816eb844c827f1a
- Author: internet-court
- GitHub username: internet-court
- License: MIT
- Repository: https://github.com/internet-court/internet-court-skill/tree/main/vendored/chaingpt/x402
- Ref: 3f6e026a3363e0954ede7bef0cfe88d4475de137
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Quality score: 67
- Public page: https://skillstore.pages.dev/skills/internet-court-x402
- Manifest: https://skillstore.pages.dev/api/skills/internet-court-x402/manifest

## Capabilities

- Explains x402 402 challenges in terms of price, token, recipient, expiry, and network.
- Builds unsigned EIP-3009 typed data for payer wallet signing.
- Assembles an X-PAYMENT header after a user supplies a signature.
- Plans facilitator actions for supported, verify, and settle operations.
- Generates PaymentRequirements for APIs that return paid HTTP 402 responses.

## Use Cases

- Pay a Protected API: Decode a 402 response, prepare signing data, and assemble the payment header for a paid retry.
- Monetize an Endpoint: Create payment requirements that describe price, token, recipient, network, and accepted settlement terms.
- Review Agent Payments: Inspect payment details before a human or wallet signs any authorization.

## Prompt Templates

### Decode a Payment Challenge

```
Use x402 to explain this 402 response in plain terms: [paste response]. Include amount, token, recipient, expiry, and network.
```

### Prepare a Payment Header

```
Build the unsigned x402 payment data for this requirement: [paste requirement]. Use payer [wallet address] and show what must be signed.
```

### Create API Payment Requirements

```
Create x402 payment requirements for an endpoint that charges [amount] USDC on Base to [recipient address].
```

### Design a Paid Request Flow

```
Plan an end-to-end x402 flow for [service]. Include challenge review, signing, header creation, facilitator verification, and settlement checks.
```

## Limitations

- Does not custody keys or sign payments for the user.
- Focuses on USDC on Base and Base Sepolia unless full token requirements are supplied.
- Requires an external wallet or signer to approve typed data.
- Facilitator behavior depends on the chosen service and network availability.

## Best Practices

- Decode and review every challenge before asking a wallet to sign.
- Confirm payee, amount, token, network, and expiry outside the payment header.
- Use Base Sepolia for testing before sending real USDC on Base.

## Anti Patterns

- Asking the skill to sign transactions or manage private keys.
- Paying a 402 challenge without checking recipient and amount.
- Assuming every facilitator supports every network, asset, or endpoint.

## Security Audit

- Audited at: 2026-07-20T03:34:33.853\+00:00
- Summary: All 19 static findings are false positives caused by Markdown backticks, not shell execution. The skill documents user-authorized USDC payment flows, so users should inspect payment terms before signing.

## Stats

- Views: 0
- Downloads: 4
- Favorites: 1
- Popularity score: 0
