Getting Started with x402 Studio
This guide will help you set up x402 Studio and create your first paid endpoint in under 10 minutes.
What You'll Need
Before you begin, make sure you have:
- A crypto wallet – Either a Base-compatible wallet (like Coinbase Wallet) or a Solana wallet (like Phantom)
- Some USDC – For testing payments on Base or Solana mainnet
- An API endpoint – A public URL that returns data you want to monetize
Step 1: Connect Your Wallet
- Visit studio.x402layer.cc
- Click Connect Wallet in the top right
- Choose your wallet type:
- Base: Connect via Coinbase Wallet or RainbowKit
- Solana: Connect via Phantom or another Solana wallet
- Sign the authentication message
Your wallet is now linked to your x402 Studio account.
Step 2: Create Your First Endpoint
- Go to Dashboard → Endpoints → New
- Fill in the endpoint details:
- Name: A description for your endpoint
- Origin URL: Your actual API endpoint
- Price: How much to charge per call (in USDC)
- Chain: Where to receive payments (Base or Solana)
- Click Create Endpoint
You'll receive a public slug like /api/public/endpoints/my-endpoint
Step 3: Test Your Endpoint
Try calling your new endpoint:
curl https://studio.x402layer.cc/api/public/endpoints/my-endpointYou'll receive a 402 Payment Required response with payment details:
{
"x402Version": 1,
"accepts": [
{
"network": "base",
"asset": "usdc",
"payTo": "0xYourWallet...",
"maxAmountRequired": "1000000"
}
]
}This tells clients exactly how to pay for access.