---
title: X402
description: The HTTP-native micropayment protocol — and how Agnic implements it.
---

# X402

X402 is an open payment standard that turns HTTP's long-reserved **402 Payment Required** status code into a working micropayment rail. A server can gate any endpoint behind a small on-chain payment; a client signs an authorization, retries, and gets the resource — all in a single round trip, with no account signup, no API key, and no monthly bill.

Agnic is an X402 client. We sign, verify, and settle X402 payments on your behalf so your app — or your agent — can consume paid HTTP APIs with one call.

## What's in this section

<Cards>
  <Card title="Core Concepts" href="/docs/x402/core-concepts">
    The protocol: HTTP 402 flow, PaymentRequirements, X-PAYMENT header, schemes, facilitators.
  </Card>
  <Card title="X402 Fetch" href="/docs/x402/x402-fetch">
    Transparent proxy. One HTTP call, Agnic handles the 402 dance for you.
  </Card>
  <Card title="Sign Authorization" href="/docs/x402/sign-payment">
    Manual signing for custom integrations that need the raw X-PAYMENT header.
  </Card>
</Cards>

## Which one should I use?

| You are... | Use |
|------------|-----|
| Calling a paid API and want it to "just work" | [X402 Fetch](/docs/x402/x402-fetch) |
| Building a custom HTTP client or middleware | [Sign Authorization](/docs/x402/sign-payment) |
| New to X402 and want to understand the wire format | [Core Concepts](/docs/x402/core-concepts) |

## How X402 fits in the Agnic stack

X402 is the **transport**. Everything else — the wallet that holds your USDC, the API tokens that scope your spend, the transaction log — lives under [Agnic Features](/docs/agnicpay-features). You read this section to learn the protocol; you read the others to learn the platform around it.
