RESTful API for AI agents and programmatic wallet management
All API requests require authentication via session cookies. Login via /login endpoint.
Create a new wallet
{
"wallet_id": "wallet_abc123",
"owner_email": "user@example.com",
"balance": 0.0,
"created_at": "2024-01-01T00:00:00"
}
Get wallet details and current balance
Deposit funds to wallet
{
"wallet_id": "wallet_abc123",
"amount": 100.00
}
Create a payment transaction (subject to rules)
{
"wallet_id": "wallet_abc123",
"amount": 50.00,
"merchant": "OpenAI",
"category": "api_services"
}
Response includes status: approved,
held, or
denied
Approve or deny a held transaction
{
"transaction_id": "txn_xyz789",
"action": "approve",
"admin_email": "admin@example.com"
}
Get transaction history for a wallet
Create a spending rule
{
"wallet_id": "wallet_abc123",
"rule_type": "amount_limit",
"condition": {"max_amount": 500},
"action": "hold",
"priority": 10
}
Get all rules for a wallet
Export complete audit log as CSV
Verify integrity of audit hash chain