DEVELOPER TOOLS

Build, test, and deploy with X402 protocol integration tools

API Base: https://x402b.netlify.app/api
🔧

API Playground

Test X402 API endpoints in real-time

âš¡

Transaction Builder

Construct and simulate transactions before broadcasting

⛽

Gas Estimator

Calculate optimal gas prices for your transactions

✓

Contract Verifier

Verify smart contracts on the X402 network

## API PLAYGROUND

## SDK LIBRARIES

JavaScript/TypeScript

v4.0.2
@x402/sdk
45.2K/week

Python

v4.0.2
x402-py
12.8K/week

Go

v4.0.2
github.com/x402/go-sdk
8.4K/week

Rust

v4.0.2
x402-rs
5.1K/week

## CODE EXAMPLES

Initialize Payment

import { X402Client } from "@x402/sdk";

const client = new X402Client({
  apiKey: process.env.X402_API_KEY,
  endpoint: "https://x402b.netlify.app/api",
  network: "mainnet"
});

const payment = await client.initializePayment({
  amount: "1.0",
  recipient: "0x742d35b9...",
  metadata: { orderId: "12345" }
});

console.log(payment.id);

Process Transaction

const result = await client.processTransaction({
  paymentId: payment.id,
  verifiedNode: true,
  layer: 2
});

if (result.status === "SUCCESS") {
  console.log("Transaction hash:", result.txHash);
}

Query Transaction Status

const status = await client.getTransactionStatus({
  txHash: "0x9e1a4c6b..."
});

console.log({
  status: status.status,
  confirmations: status.confirmations,
  layer: status.layer
});

## DEVELOPER RESOURCES

API Reference

Complete API documentation with examples

GitHub Examples

Sample projects and integration templates

Developer Forum

Connect with the X402 community