Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Purch API

Public x402 API for Purch — lets AI agents search and buy products on Amazon and Shopify, and track shipments across 3,400+ carriers. Every endpoint is payable via the x402 protocol with USDC on Solana. No API keys, no signups — payment is the authentication.

📊 Live x402 Metrics

x402scan Transactions Volume Buyers

All-time snapshot as of August 2026 — see the live numbers, charts, and resource pricing on x402scan.

Endpoints

Method Endpoint Price Description
GET /x402/search $0.01 Structured product search with filters
POST /x402/shop $0.10 Natural language AI shopping assistant
POST /x402/buy dynamic Buy a product — price equals the product total
GET /x402/track $0.52 Track any shipment by tracking number (3,400+ carriers)

Interactive docs at api.purch.xyz/docs · OpenAPI spec at api.purch.xyz/openapi.json · Discovery at /.well-known/x402.

Payment

The first request to any endpoint returns a 402 Payment Required response with payment details; an x402-capable client (e.g. @x402/fetch) pays in USDC on Solana and retries automatically.

# Returns 402 with payment instructions
curl "https://api.purch.xyz/x402/search?q=wireless+headphones"
import { wrapFetchWithPayment } from "@x402/fetch";

const fetchWithPay = wrapFetchWithPayment(fetch, signer);
const res = await fetchWithPay("https://api.purch.xyz/x402/search?q=wireless+headphones");

One-Command Checkout

curl -X POST "https://api.purch.xyz/x402/buy" \
  -H "Content-Type: application/json" \
  -d '{
    "asin": "B0CXYZ1234",
    "email": "john@example.com",
    "shippingAddress": {
      "name": "John Doe",
      "line1": "123 Main St",
      "city": "San Francisco",
      "state": "CA",
      "postalCode": "94102",
      "country": "US"
    }
  }'

The 402 quote equals the full product total (including tax and shipping). Once paid, Purch places the order and returns the order id and status.

Links

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages