How to Add Payment Rails to Your AI Agent in 5 Minutes
Your AI agent needs to buy things. API calls, compute resources, data lookups, webhook deliveries — the list grows every day. But here's the problem: giving an agent a credit card is like giving a toddler a chainsaw.
You need spending guardrails. Per-transaction limits. Audit trails. That's what Conduit provides — a wallet API specifically designed for autonomous agents.
The Problem
AI agents are supposed to operate autonomously. But every agent platform today forces you to:
- Use your own Stripe account (liability nightmare)
- Manually reconcile what the agent spent
- Hope it doesn't run up a surprise bill
Agents need their own budgets with hard limits. We're not talking about credit — we're talking about provisioning a finite amount of credits and cutting off purchases when they're gone.
The Solution: Conduit Wallet API
Conduit gives your agent a wallet with built-in spending policies. Create a wallet, set a spending limit, and the agent can only spend up to that amount. No overdrafts. No surprises. Full audit trail.
Here's how to add it to your agent in 5 minutes.
Step 1: Sign Up (60 seconds)
Get your API key
Sign up at /signup — you'll get a one-time API key in under a minute. The signup form creates a wallet with $1,000 in test credits.
Step 2: Create a Wallet for Your Agent
Provision a wallet
Create a wallet with a spending limit. The agent can never spend more than this.
Create wallet with $500 spending limit
curl -X POST https://conduit-5.polsia.app/api/wallets \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"initial_balance_cents": 50000,
"spending_limit_cents": 50000,
"email": "agent@yourcompany.com",
"company_name": "Your Company"
}'
The response gives you the wallet ID and a fresh API key for this specific wallet:
Response
{
"wallet": {
"id": "wallet_abc123",
"balance_cents": 50000,
"spending_limit_cents": 50000,
"api_key": "cond_xxxxxxxxxxxx"
}
}
Step 3: Make a Purchase
Execute a purchase
The agent makes purchases against the wallet. Conduit validates against the spending limit before executing.
Make a $15 purchase from a vendor API
curl -X POST https://conduit-5.polsia.app/api/wallets/wallet_abc123/purchase \
-H "Authorization: Bearer cond_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"amount_cents": 1500,
"vendor": "openai",
"description": "GPT-4 API call for data processing"
}'
If the purchase exceeds available balance, it fails immediately:
Insufficient funds response
{
"success": false,
"error": "Insufficient funds",
"available": 3500,
"requested": 15000
}
Step 4: Set Spending Policies
Configure guardrails
The spending limit you set during wallet creation is the hard cap. For finer control, you can update it anytime:
Update spending limit to $100
curl -X PATCH https://conduit-5.polsia.app/api/wallets/wallet_abc123 \
-H "Authorization: Bearer cond_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"spending_limit_cents": 10000
}'
Step 5: Check Transaction History
Audit everything
Every transaction is logged with full metadata for reconciliation.
Get transaction history
curl -X GET "https://conduit-5.polsia.app/api/wallets/wallet_abc123/transactions?limit=10" \
-H "Authorization: Bearer cond_xxxxxxxxxxxx"
Response
{
"transactions": [
{
"id": "txn_xyz789",
"type": "purchase",
"amount_cents": 1500,
"vendor": "openai",
"status": "completed",
"metadata": {
"description": "GPT-4 API call for data processing"
},
"created_at": "2026-04-04T10:30:00Z"
}
],
"has_more": false
}
JavaScript Integration
Here's how your agent actually uses it:
Simple wrapper for AI agent
const CONDUIT_API_KEY = 'cond_xxxxxxxxxxxx';
const WALLET_ID = 'wallet_abc123';
const BASE_URL = 'https://conduit-5.polsia.app';
async function makePurchase(amountCents, vendor, description) {
const res = await fetch(`${BASE_URL}/api/wallets/${WALLET_ID}/purchase`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${CONDUIT_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount_cents: amountCents,
vendor: vendor,
description: description
})
});
const data = await res.json();
if (!data.success) {
throw new Error(`Purchase failed: ${data.error}`);
}
return data.transaction;
}
// Usage in your agent:
const txn = await makePurchase(1500, 'openai', 'GPT-4 API call');
console.log(`Purchase complete: ${txn.id}`);
What You Get Out of the Box
- Wallet with limits — Hard caps that can't be exceeded
- Per-transaction validation — Instant decline on insufficient funds
- Full audit trail — Every purchase logged with metadata
- API key auth — Simple Bearer token, no OAuth complexity
- Test credits — $1,000 free to start
Ready to give your agent a wallet?
Get your API key in 60 seconds. No credit card required.
Get Started FreeNext Steps
- Full API documentation — All endpoints, error codes, rate limits
- Pricing — 2.9% + $0.05 per transaction
Questions? Reach out or open an issue on GitHub.