[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73544":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},73544,"x402","x402-foundation\u002Fx402","x402-foundation","A payments protocol for the internet. Built on HTTP.","https:\u002F\u002Fx402.org",null,"TypeScript",6157,1716,56,189,0,14,35,108,42,40.7,"Apache License 2.0",false,"main",true,[],"2026-06-12 02:03:14","# x402\n\nx402 is an open standard for internet native payments. It aims to support all networks (both crypto & fiat) and forms of value (stablecoins, tokens, fiat).\n\n```typescript\napp.use(\n  paymentMiddleware(\n    {\n      \"GET \u002Fweather\": {\n        accepts: [...],                 \u002F\u002F As many networks \u002F schemes as you want to support\n        description: \"Weather data\",    \u002F\u002F what your endpoint does\n      },\n    },\n  ),\n);\n\u002F\u002F That's it! See examples\u002F for full details\n```\n\n## Installation\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Typescript\u003C\u002Fb>\u003C\u002Fsummary>\n\n\u003Cbr\u002F> \n\n> See all the packages available in the [**Typescript SDK**](.\u002Ftypescript\u002F), including chain implementations of x402, code examples and integration guides.\n\n```shell\n# All available reference sdks\nnpm install @x402\u002Fcore \\\n  @x402\u002Fevm @x402\u002Fsvm @x402\u002Fstellar @x402\u002Fsvm \\\n  @x402\u002Faxios @x402\u002Ffastify @x402\u002Ffetch @x402\u002Fexpress @x402\u002Fhono @x402\u002Fnext @x402\u002Fpaywall @x402\u002Fextensions\n```\n\n```shell\n# Minimal Fetch client\nnpm install @x402\u002Fcore @x402\u002Fevm @x402\u002Fsvm @x402\u002Ffetch\n```\n\n```shell\n# Minimal express Server\nnpm install @x402\u002Fcore @x402\u002Fevm @x402\u002Fsvm @x402\u002Fexpress\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Python\u003C\u002Fb>\u003C\u002Fsummary>\n\n\u003Cbr\u002F> \n\n> See the [**`python\u002Fx402`**](.\u002Fpython\u002F) folder for code examples and integration guides.\n\n```shell\npip install x402\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Go\u003C\u002Fb>\u003C\u002Fsummary>\n\n\u003Cbr\u002F> \n\n> See the [**`go\u002F`**](.\u002Fgo\u002F) folder for code examples and integration guides.\n\n```shell\ngo get github.com\u002Fx402-foundation\u002Fx402\u002Fgo\n```\n\n\u003C\u002Fdetails>\n\n\n## Principles\n\n- **Open standard:** x402 is an open standard, freely accessible and usable by anyone. It will never force reliance on a single party.\n- **HTTP \u002F Transport Native:** x402 is meant to seamlessly complement existing data transportation. It should whenever possible not mandate additional requests outside the scope of a typical client \u002F server flow.\n- **Network, token, and currency agnostic:** we welcome contributions that add support for new networks (both crypto and fiat), signing standards, or schemes, so long as they meet our acceptance criteria laid out in [CONTRIBUTING.md](https:\u002F\u002Fgithub.com\u002Fx402-foundation\u002Fx402\u002Fblob\u002Fmain\u002FCONTRIBUTING.md). x402 may extend support to fiat based networks, but will never deprioritize onchain payments in favor of fiat payments.\n- **Backwards Compatible:** x402 will not deprecate support for any existing networks unless such removal is deemed necessary for the security of the standard. Whenever possible, x402 will aim for backwards compatibility for non-major version changes.\n- **Trust minimizing:** all payment schemes must not allow for the facilitator or resource server to move funds, other than in accordance with client intentions\n- **Easy to use:** It is the goal of the x402 community to improve ease of use relative to other forms of payment on the Internet. This means abstracting as many details of crypto as possible away from the client and resource server, and into the facilitator. This means the client\u002Fserver should not need to think about gas, rpc, etc.\n\n## Ecosystem\n\nThe x402 ecosystem is growing! Check out our [ecosystem page](https:\u002F\u002Fx402.org\u002Fecosystem) to see projects building with x402, including:\n\n- Client-side integrations\n- Services and endpoints\n- Ecosystem infrastructure and tooling\n- Learning and community resources\n\nWant to add your project to the ecosystem? See our [demo site README](https:\u002F\u002Fgithub.com\u002Fx402-foundation\u002Fx402\u002Ftree\u002Fmain\u002Ftypescript\u002Fsite#adding-your-project-to-the-ecosystem) for detailed instructions on how to submit your project.\n\n**Roadmap:** see [ROADMAP.md](https:\u002F\u002Fgithub.com\u002Fx402-foundation\u002Fx402\u002Fblob\u002Fmain\u002FROADMAP.md)\n\n**Documentation:** see [`docs\u002F`](.\u002Fdocs\u002F) for the published documentation source (Mintlify). Payment **schemes** include **`exact`**, **`upto`**, and **`batch-settlement`**; specifications live under [`specs\u002Fschemes\u002F`](.\u002Fspecs\u002Fschemes\u002F).\n\n## Terms:\n\n- `resource`: Something on the internet. This could be a webpage, file server, RPC service, API, any resource on the internet that accepts HTTP \u002F HTTPS requests.\n- `client`: An entity wanting to pay for a resource.\n- `facilitator`: A server that facilitates verification and execution of payments for one or many networks.\n- `resource server`: An HTTP server that provides an API or other resource for a client.\n\n## Technical Goals:\n\n- Permissionless and secure for clients, servers, and facilitators\n- Minimal friction to adopt for both client and resource servers\n- Minimal integration for the resource server and client (1 line for the server, 1 function for the client)\n- Ability to trade off speed of response for guarantee of payment\n- Extensible to different payment flows and networks\n\n## Specification\n\nSee `specs\u002F` for full documentation of the x402 standard\u002F\n\n### Typical x402 flow\n\nx402 payments typically adhere to the following flow, but servers have a lot of flexibility. See `advanced` folders in `examples\u002F`.\n![](.\u002Fstatic\u002Fflow.png)\n\nThe following outlines the flow of a payment using the `x402` protocol. Note that steps (1) and (2) are optional if the client already knows the payment details accepted for a resource.\n\n1. `Client` makes an HTTP request to a `resource server`.\n\n2. `Resource server` responds with a `402 Payment Required` status and a `PaymentRequired` b64 object return as a `PAYMENT-REQUIRED` header.\n\n3. `Client` selects one of the `PaymentRequirements` returned by the server response and creates a `PaymentPayload` based on the `scheme` & `network` of the `PaymentRequirements` they have selected.\n\n4. `Client` sends the HTTP request with the `PAYMENT-SIGNATURE` header containing the `PaymentPayload` to the resource server.\n\n5. `Resource server` verifies the `PaymentPayload` is valid either via local verification or by POSTing the `PaymentPayload` and `PaymentRequirements` to the `\u002Fverify` endpoint of a `facilitator`.\n\n6. `Facilitator` performs verification of the object based on the `scheme` and `network` of the `PaymentPayload` and returns a `Verification Response`.\n\n7. If the `Verification Response` is valid, the resource server performs the work to fulfill the request. If the `Verification Response` is invalid, the resource server returns a `402 Payment Required` status and a `Payment Required Response` JSON object in the response body.\n\n8. `Resource server` either settles the payment by interacting with a blockchain directly, or by POSTing the `Payment Payload` and `Payment PaymentRequirements` to the `\u002Fsettle` endpoint of a `facilitator server`.\n\n9. `Facilitator server` submits the payment to the blockchain based on the `scheme` and `network` of the `Payment Payload`.\n\n10. `Facilitator server` waits for the payment to be confirmed on the blockchain.\n\n11. `Facilitator server` returns a `Payment Execution Response` to the resource server.\n\n12. `Resource server` returns a `200 OK` response to the `Client` with the resource they requested as the body of the HTTP response, and a `PAYMENT-RESPONSE` header containing the `Settlement Response` as Base64 encoded JSON if the payment was executed successfully.\n\n### Schemes\n\nA scheme is a logical way of moving money.\n\nBlockchains allow for a large number of flexible ways to move money. To help facilitate an expanding number of payment use cases, the `x402` protocol is extensible to different ways of settling payments via its `scheme` field.\n\nEach payment scheme may have different operational functionality depending on what actions are necessary to fulfill the payment.\nFor example, **`exact`** transfers a specific amount (for example, pay $1 to read an article). **`upto`** authorizes up to a maximum per request; the seller settles the actual usage, up to that cap. **`batch-settlement`** (EVM) uses escrow and off-chain vouchers so sellers can redeem many small charges onchain in batches instead of settling every HTTP request separately.\n\nSee `specs\u002Fschemes` for full scheme specifications; `specs\u002Fschemes\u002Fexact\u002Fscheme_exact_evm.md` describes **exact** payments on EVM chains.\n\n### Schemes vs Networks\n\nBecause a scheme is a logical way of moving money, the way a scheme is implemented can be different for different blockchains. (ex: the way you need to implement `exact` on Ethereum is very different from the way you need to implement `exact` on Solana).\n\nClients and facilitators must explicitly support different `(scheme, network)` pairs in order to be able to create proper payloads and verify \u002F settle payments.\n","x402 是一个基于 HTTP 的互联网支付协议，旨在支持所有类型的网络（包括加密货币和法定货币）及价值形式（如稳定币、代币和法定货币）。其核心功能允许开发者通过简单的中间件配置来为API端点添加支付选项，支持多种网络和方案，并且易于集成。技术上采用 TypeScript 编写，提供丰富的SDK供不同语言环境使用，强调开放标准、网络中立性以及对现有数据传输流程的无缝补充。该项目适用于需要在互联网应用中实现灵活支付解决方案的场景，特别是那些希望跨越多种支付网络并保持较低开发复杂度的应用。",2,"2026-06-11 03:46:05","high_star"]