Your first micropayment is 5 minutes away.By the end of this guide, your API will accept USDC payments from AI agents worldwide. No payment processor approval. No minimum transaction fees. Just configure and earn.
Prerequisites#
Before you begin, make sure you have:A Solana, Base or SKALE wallet address (to receive USDC payments)
An API endpoint you want to monetize
Basic familiarity with REST APIs
1.
Configure your API to use gateway.kobaru.io as the facilitator URL.
For advances features (Developer and Professional Plans):#
Step 1: Create your account#
Step 2: Register your API#
2.
Enter your service details:Service name: A descriptive name (e.g., weather-api)
Backend URL: Your API's base URL (e.g., https://api.yourcompany.com)
Slug: A unique identifier for your proxy URL (e.g., weather)
3.
Define your first paid route:Route pattern: The endpoint path (e.g., /premium-data)
Price: Cost per request in USD (e.g., $0.001)
Usage model: Choose pay_per_request or pay_per_time
Step 3: Get your API key#
1.
Go to Settings > API Keys
3.
Copy your key (format: kbr_live_xxx...)
Warning: Save this key securely. It will only be displayed once. If you lose it, you'll need to generate a new one.
Your API key authenticates requests to Kobaru's gateway endpoints. You'll need it for SDK integration or direct API calls.
Step 4: Choose your integration#
Kobaru offers four integration paths. Choose based on your needs:| Integration | Best for | Code changes |
|---|
| Transparent Proxy | Fastest setup, no backend changes | None |
| Standard SDK | Full control, TypeScript/Node.js | Middleware addition |
| Advanced SDK | Sessions, budgets, analytics | Coming soon |
| Direct API | Any language, custom implementations | Full implementation |
Option A: Transparent proxy (no code)#
No code changes required. Your API is immediately accessible at:https://access.kobaru.io/{your-slug}/premium-data
Returns HTTP 402 with payment requirements when clients access your endpoint
Verifies payments and forwards authenticated requests to your backend
Tracks usage and handles refunds
Example: If your slug is weather, clients access your API at:https://access.kobaru.io/weather/forecast
Option B: Standard SDK integration#
Add payment middleware directly to your existing API for full control over the payment flow.
Check out standard SDKs available at official x402 GithubAdd payment middleware (Hono example):Note: Replace solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp with solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1 for devnet testing.
Step 5: Test your integration#
Test that your endpoint returns the correct payment requirements:The PAYMENT-REQUIRED header contains base64-encoded payment instructions that x402-compatible clients use to construct payment transactions.
What happens next#
When a client (AI agent, developer, or application) wants to access your API:1.
Client requests your endpoint
2.
Kobaru returns HTTP 402 with payment options
3.
Client signs a Solana transaction paying the required amount
4.
Client resubmits the request with payment proof in the PAYMENT-SIGNATURE header
5.
Kobaru verifies the payment and forwards the request to your backend
6.
Your API returns the response, and the payment settles
This entire flow happens in milliseconds, enabling true micropayments for API access.
You're live. What's next?#
Your API now accepts micropayments. Here's how to get the most out of it:Go deeper with your integration:
Getting help#
Discord: Join our developer community for real-time help
Modified at 2026-01-22 17:26:57