
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
x402-permit
Advanced tools
Core TypeScript implementation of the x402 Payment Protocol. This package provides the foundational types, schemas, and utilities that power all x402 integrations.
npm install x402
The x402 package provides the core building blocks for implementing the x402 Payment Protocol in TypeScript. It's designed to be used by:
This core package is used by the following integration packages:
x402-express: Express.js middlewarex402-hono: Hono middlewarex402-next: Next.js middlewarex402-fetch: Fetch API wrapperx402-axios: Axios interceptorIf you're not using one of our server middleware packages, you can implement the x402 protocol manually. Here's what you'll need to handle:
For a complete example implementation, see our advanced server example which demonstrates both synchronous and asynchronous payment processing patterns.
If you're not using our x402-fetch or x402-axios packages, you can manually integrate the x402 protocol in your client application. Here's how:
Make a request to a x402-protected endpoint. The server will respond with a 402 status code and a JSON object containing:
x402Version: The version of the x402 protocol being usedaccepts: An array of payment requirements you can fulfillSelect the payment requirement you wish to fulfill from the accepts array
Create the payment header using the selected payment requirement
Retry your network call with:
X-PAYMENT fieldAccess-Control-Expose-Headers field set to "X-PAYMENT-RESPONSE" to receive the server's transaction responseFor implementation examples, we recommend reviewing our official client packages:
FAQs
x402 (Permit) Payment Protocol
The npm package x402-permit receives a total of 0 weekly downloads. As such, x402-permit popularity was classified as not popular.
We found that x402-permit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.