
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@wtflabs/x402
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
We found that @wtflabs/x402 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

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