# x402-foundation/x402

A payments protocol for the internet. Built on HTTP.

Repository: https://github.com/x402-foundation/x402
Canonical: https://ross.abutalabs.com/products/x402
Homepage: https://x402.org
Language: TypeScript
License: Apache-2.0
License Family: permissive
Last push: 2026-08-26T20:37:16+00:00

## Health v2 (maintenance only)
Score: 65/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 35, longevity 39
- inputs: {"age_days": 559, "days_push": 7, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6543, forks 1967 (observed 2026-08-28T04:09:45.058353+00:00)

## What it is
x402 is an open standard and SDK suite for internet-native payments built on the HTTP 402 status code, letting servers charge for API or content access with a single line of middleware. It supports multiple blockchains (EVM, Solana, and others) and fiat rails, and is designed for both human developers and AI agents making machine-to-machine payments.

## Use cases
- monetize an api with per-request micropayments
- add a paywall to http endpoints with one line of middleware
- let ai agents pay for api access programmatically without accounts
- accept stablecoin payments for web services
- charge for content over http using the 402 status code
- build machine-to-machine payment flows for agents

## When to choose
- you want usage-based or micropayment monetization of an API without accounts or subscriptions
- you need programmatic payments suitable for AI agents and machine-to-machine traffic
- you want a network-agnostic, open standard with SDKs for TypeScript, Python, and Go
- you prefer zero protocol fees and crypto-native settlement

## When to avoid
- you need traditional subscription billing, invoicing, or card checkout flows
- your users cannot or will not use crypto wallets or stablecoins
- you require full regulatory/compliance features like KYC built into the payment layer
- your stack has no supported SDK and you cannot implement the HTTP 402 flow yourself

## Facets
- artifact type: library
- maturity: active
- function: middleware, http-client, api-framework, sdk, cryptography
- domain: fintech, apis, web-development, large-language-models, blockchain, developer-tools
- platform: python, go, cross-platform
- tags: payments, http-402, micropayments, stablecoins, crypto-payments, agentic-payments, paywall, monetization, open-standard, usdc, ai-agents, nodejs, typescript, web-server

## Member repositories
- x402-foundation/x402 (main) score 65

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:45.058353+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:44:06.491407+00:00, confidence not recorded.
  - readme: https://github.com/x402-foundation/x402 (fetched 2026-08-28T04:09:45.058353+00:00, sha 0a83adc94f90)
  - homepage: https://x402.org (fetched 2026-08-29T08:40:42.399054+00:00, sha 56d7b9dec7bd)
  - site_page: https://docs.x402.org/ (fetched 2026-08-29T08:40:42.408190+00:00, sha 58ea3997cc30)
  - site_page: https://docs.x402.org/getting-started/quickstart-for-buyers (fetched 2026-08-29T08:40:42.411083+00:00, sha 8979507ee9e9)
  - site_page: https://docs.x402.org/getting-started/quickstart-for-sellers (fetched 2026-08-29T08:40:42.414180+00:00, sha b74958feb8e0)
  - registry_npm: https://registry.npmjs.org/x402 (fetched 2026-08-29T08:40:42.416571+00:00, sha cafc159f960b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
