Kobaru
  1. Introduction
Kobaru
  • Kobaru.io Gateway API
    • Introduction
      • What is Kobaru?
      • Quick start
      • How x402 works
    • Integration
      • Standard x402 SDK
      • Advanced SDK
      • Transparent proxy integration
      • Direct API integration
    • Core Concepts
      • Available Chains and Assets
      • Payment schemes
      • Security
      • Usage models
    • Guides
      • Pricing your API
      • Going to Production
      • Testing with devnet
      • Bazaar discovery
    • API Reference
      • Error Handling
      • Get Supported Payment Kinds
      • Verify Payment Authorization
      • Settle Payment
    • Discovery
      • List Discovery Resources
    • Schemas
      • SupportedResponse
      • ErrorResponse
      • UnauthorizedResponse
      • RateLimitResponse
      • VerifySuccessResponse
      • VerifyErrorResponse
      • SettleSuccessResponse
      • SettleErrorResponse
      • DiscoveryResourceItem
      • ListDiscoveryResourcesResponse
  1. Introduction

Quick start

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

For Community Access (Kobaru Public Facilitator)#

1.
Configure your API to use gateway.kobaru.io as the facilitator URL.
2.
Go for step 4B

For advances features (Developer and Professional Plans):#

Step 1: Create your account#

1.
Go to console.kobaru.io
2.
Sign up with your email

Step 2: Register your API#

In the Kobaru Console:
1.
Click New Service
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
2.
Click Create API Key
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:
IntegrationBest forCode changes
Transparent ProxyFastest setup, no backend changesNone
Standard SDKFull control, TypeScript/Node.jsMiddleware addition
Advanced SDKSessions, budgets, analyticsComing soon
Direct APIAny language, custom implementationsFull 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
Kobaru automatically:
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 Github
Install the SDK:
Add 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:
Expected response:
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:
Optimize your setup:
Pricing your API - Set prices that maximize revenue
Testing with devnet - Validate with test payments before going live
Go deeper with your integration:
Transparent proxy - Advanced proxy configuration
Standard SDK - Dynamic pricing, custom responses
Direct API - Full control in any language
Reference:
API documentation - Complete endpoint specs

Getting help#

Documentation: docs.kobaru.io
Support: support@kobaru.io
Discord: Join our developer community for real-time help
Modified at 2026-01-22 17:26:57
Previous
What is Kobaru?
Next
How x402 works
Built with