Skip to main content
OnDB supports multiple payment flows for different use cases. All payments are made in USDC.

Payment Methods Overview

Payment Callback

The recommended approach for most applications. The SDK handles the entire flow automatically:

Quote Structure

The quote object contains all payment details:

Auto-Pay (Agent Key)

When using an Agent Key (an App Key with Pay permission), payments are handled automatically by the broker — no callback needed:
The broker verifies the agent’s pay limits, transfers USDC automatically, and completes the write. See Agent Keys for configuration and spend limits.

Pre-paid Transaction

For scenarios where you’ve already made the payment, pass the payment proof via the callback:

Wallet Integration Example

The payment callback is wallet-agnostic. You provide a function that processes the quote and returns a payment result:

Next Steps

PriceIndex

Value-based payment model

Paid Reads

HTTP 402 for read operations