DainoPay is a standalone payment API built for autonomous AI agents. Wallets, double-entry ledger, policy engine, fraud detection — all behind a single API key.
Everything AI agents need to handle money safely and autonomously.
Each agent gets its own wallet with independent balance tracking, spending limits, and freeze controls. Isolate funds per agent type.
Every transaction creates immutable debit + credit entries. The ledger is the source of truth — wallet balances are a verified cache.
Transfers, deposits, and withdrawals execute inside PostgreSQL functions with row-level locks. No double-spending, ever.
Define per-agent spending rules: daily limits, per-transaction caps, required approval thresholds. Policies are evaluated before every payment.
5-rule scoring engine: unusual amounts, velocity spikes, new counterparties, off-hours activity, round numbers. High-risk payments are auto-blocked.
Subscribe to payment events with HMAC-signed webhooks. Exponential backoff retry with 5 attempts. Filter by event type.
A Stripe-like SDK that feels familiar from day one.
// 1. Get your API key curl -X POST https://your-dainopay.onrender.com/v1/api-keys \ -H "Authorization: Bearer YOUR_BOOTSTRAP_TOKEN" \ -H "Content-Type: application/json" \ -d '{"client_name": "my-app", "environment": "live"}' // Response: { "data": { "key": "dp_live_abc123...", ... } } // 2. Download the SDK (single file, zero dependencies except axios) curl -o DainoPayClient.js https://your-dainopay.onrender.com/sdk npm install axios // 3. Use it const DainoPayClient = require('./DainoPayClient'); const dp = new DainoPayClient('dp_live_abc123...', { baseUrl: 'https://your-dainopay.onrender.com' });
// Create a wallet for your order fulfillment agent const wallet = await dp.createWallet({ type: 'agent', agentType: 'order_fulfillment', label: 'Order Fulfillment Agent', currency: 'USD' }); // Fund the wallet await dp.deposit(wallet.id, { amount: 5000, description: 'Initial agent funding' }); // Check balance const balance = await dp.getWallet(wallet.id); console.log(balance); // { balance: 5000, held_balance: 0 }
// Transfer between agent wallets // Policy engine + fraud detection run automatically const txn = await dp.createTransfer({ fromWalletId: orderAgent.id, toWalletId: supplierWallet.id, amount: 149.99, description: 'Pay supplier for order #1042', category: 'supplier_payment', initiatedBy: 'order_fulfillment' }); // If policy requires approval: // txn.status === 'pending_approval' // Your webhook gets a payment.requires_approval event // Approve it: await dp.approveTransaction(txn.id);
// Register a webhook endpoint await dp.createWebhook({ url: 'https://myapp.com/api/webhooks/dainopay', events: ['payment.completed', 'payment.requires_approval', 'fraud.alert'] }); // Verify incoming webhooks (Express example) app.post('/api/webhooks/dainopay', (req, res) => { const signature = req.headers['dainopay-signature']; const valid = DainoPayClient.verifyWebhookSignature( req.body, signature, 'your_webhook_secret' ); if (!valid) return res.status(401).send('Invalid signature'); const { type, data } = req.body; console.log(`Event: ${type}`, data); res.json({ received: true }); });
RESTful endpoints with Stripe-style JSON responses. All routes require Authorization: Bearer dp_live_xxx.
Deploy DainoPay in minutes. One API key, full financial control.
Get Started