Use Cases
Real scenarios where PayDirect powers programmable crypto settlement across the autonomous economy.
Agent-to-Agent Payments
Autonomous agents exchange value programmatically during multi-step workflows. No human intervention required — agents negotiate, settle, and confirm payments entirely on-chain.
Examples
- AI agent pays another agent for data retrieval
- Multi-agent workflows with cascading payments
- Agent-initiated subscriptions to other agent services
Code Example
// Agent A creates a payment invoice for Agent B
const { payment, receivingAddress } = await client.createPayment({
tokenSymbol: "USDC",
amount: "2.50",
merchantWallet: "0xAgentA_Settlement_Wallet",
description: "Data enrichment service",
metadata: {
sellerAgent: "agent_alice",
buyerAgent: "agent_bob",
task: "data_enrichment",
},
});
// Agent B sends USDC to receivingAddress on BaseAPI Monetization
Charge per API call with real-time settlement. Create a payment intent per request, store the receipt, and trigger fulfillment only after settlement. Reconcile using webhook events.
Examples
- Pay-per-call API access
- Metered usage with automatic billing
- Tiered pricing based on consumption
Code Example
// Middleware: charge per API request
app.use("/api/premium", async (req, res, next) => {
const { payment } = await client.createPayment({
tokenSymbol: "USDC",
amount: "0.01",
merchantWallet: PLATFORM_WALLET,
description: "API call billing",
metadata: { endpoint: req.path },
});
await waitForSettlement(payment.id);
next();
});Micropayments
Scale microtransaction ecosystems that traditional payment rails cannot handle. Sub-cent settlement at scale, enabling new business models like pay-per-byte, pay-per-inference, and granular content monetization.
Examples
- Pay-per-inference for AI models
- Content micropayments (articles, data feeds)
- IoT device-to-device payments
Code Example
// Micropayment for AI inference
const { payment } = await client.createPayment({
tokenSymbol: "USDC",
amount: "0.001",
merchantWallet: MODEL_PROVIDER_WALLET,
description: "GPT-4 inference call",
metadata: { model: "gpt-4", tokens: 1500 },
});Subscriptionless Billing
Recurring or on-demand payments without credit cards or subscription management overhead. Programmable billing schedules that trigger settlement automatically based on usage or time intervals.
Examples
- Usage-based billing without subscriptions
- Time-interval triggered payments
- Consumption-based SaaS billing
Code Example
// Scheduled payment (cron-triggered)
const { payment } = await client.createPayment({
tokenSymbol: "USDC",
amount: computedUsage.toString(),
merchantWallet: BILLING_WALLET,
description: "Monthly usage billing",
metadata: { period: "2026-02", usage: computedUsage },
});SaaS Platform Integration
Add crypto settlement to your SaaS platform with minimal code changes. PayDirect provides a Stripe-like experience for Web3 — familiar patterns, instant settlement.
Examples
- Checkout flows with USDC settlement
- Platform marketplace payments
- Vendor payout automation
Code Example
// SaaS checkout integration
const { payment, receivingAddress } = await client.createPayment({
tokenSymbol: "USDC",
amount: plan.price,
merchantWallet: PLATFORM_WALLET,
description: `${plan.name} - ${user.email}`,
metadata: { planId: plan.id, userId: user.id },
});
// Show receivingAddress to user for payment on BaseDAO & Governance Payments
Automate payments triggered by DAO proposals and governance decisions. When a proposal passes, PayDirect settles the payment — no manual treasury management required.
Examples
- Proposal-approved grant disbursements
- Bounty payouts on task completion
- Multi-sig treasury operations
Code Example
// DAO proposal triggers payment
async function onProposalPassed(proposal) {
const { payment } = await client.createPayment({
tokenSymbol: "USDC",
amount: proposal.budget,
merchantWallet: proposal.recipientWallet,
description: `Grant: ${proposal.title}`,
metadata: { proposalId: proposal.id, dao: "agentdao" },
});
}On-Chain Token Swaps
Swap tokens via Uniswap V3 with a single API call. Get price quotes, set slippage tolerance, and execute swaps from EOA or gasless smart wallets. Ideal for OTC platforms and token purchase flows.
Examples
- OTC token purchase (buy ADAO with USDC)
- Treasury rebalancing (swap ETH for stablecoins)
- Multi-token checkout (accept any token, settle in USDC)
Code Example
// Get a swap quote
const { quote } = await client.getSwapQuote({
tokenIn: "USDC",
tokenOut: "ETH",
amount: "100",
slippageBps: 50,
});
console.log(`Rate: ${quote.exchangeRate}`);
// Execute the swap
const { swap } = await client.executeSwap({
tokenIn: "USDC",
tokenOut: "ETH",
amount: "100",
walletType: "smart_wallet",
});
console.log(`Tx: ${swap.txHash}`);AI Agent Financial Tools
Give LangChain or Vercel AI SDK agents the power to autonomously check balances, make payments, swap tokens, and manage wallets. Build treasury agents, payment bots, and DeFi automation.
Examples
- Autonomous treasury agent that rebalances portfolio
- Payment processing agent for e-commerce
- AI agent that pays other agents for completed work
Code Example
// Vercel AI SDK — agent with PayDirect tools
import { createPayDirectTools } from "@paydirect/ai-sdk";
import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
const tools = createPayDirectTools({
apiKey: process.env.PAYDIRECT_API_KEY!,
});
const { text } = await generateText({
model: openai("gpt-4o"),
tools,
maxSteps: 5,
prompt: "Check balance. If USDC > 500, swap 50% for ETH.",
});Build Your Use Case
Start integrating PayDirect into your application with our developer-first APIs and SDKs.
