Kobaru
  1. Core Concepts
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. Core Concepts

Payment schemes

Payment schemes#

Payment schemes define how payments are constructed, validated, and settled on blockchain networks. Kobaru currently supports the exact scheme on Solana, Base and SKALE.

Understanding payment schemes#

A payment scheme specifies:
How the payment transaction is constructed
What validations occur before settlement
How settlement executes on-chain
Different schemes enable different payment patterns. The exact scheme performs a direct transfer of the specified amount.

Exact scheme#

The exact scheme transfers tokens directly from the payer to your wallet. This is the simplest and most common payment pattern.

How it works#

1.
You specify the exact amount required for your API
2.
The client constructs a transaction transferring that amount
3.
Kobaru validates the transaction structure
4.
Kobaru executes the settlement on-chain

Solana implementation#

On Solana, the exact scheme uses SPL token TransferChecked instructions:
Transaction structure:
1. SetComputeUnitLimit (required)
2. SetComputeUnitPrice (required)
3. CreateAssociatedTokenAccount (optional, if destination ATA doesn't exist)
4. TransferChecked (required)
Key features:
FeatureDescription
Direct transferTokens go directly to your wallet
Gasless for clientsKobaru pays transaction fees
Instant settlementSub-second finality on Solana
Exact amountTransfer amount must match exactly

Payment requirements#

When you use the exact scheme, your payment requirements look like:
{
  "scheme": "exact",
  "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
  "amount": "10000",
  "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "payTo": "YourWalletAddress...",
  "maxTimeoutSeconds": 60
}

Validation checks#

Kobaru performs these validations before settling your payment:
1.
Amount validation - Transfer amount exactly matches your requirements
2.
Recipient validation - Destination is your correct associated token account
3.
Fee payer validation - Kobaru is set as the fee payer
4.
Instruction topology - Instructions are in the correct order
5.
Priority fee limit - Fees do not exceed the configured maximum
6.
Transaction simulation - Dry-run to ensure the transaction succeeds

Future schemes#

Additional payment schemes are in development for different use cases:

Deferred scheme (planned)#

Pre-authorize payments that you capture later. Useful for:
Metered usage billing
Subscription services
Variable-cost operations

Streaming scheme (planned)#

Continuous micropayments for real-time services. Useful for:
Pay-per-second API access
Live data feeds
Compute time billing

Scheme selection#

When you configure your integration, specify the scheme in your payment requirements:

Related documentation#

Networks and assets - Supported blockchains and tokens
Usage models - Pay-per-request vs pay-per-time
API reference - Payment verification endpoint
Modified at 2026-01-22 17:31:31
Previous
Available Chains and Assets
Next
Security
Built with