Contents
Quick startAuthenticationCreditsCreate agentSend paymentCheck balanceTransactionsDepositWithdrawWebhooksError codesThe AMILLIPAY API lets you create agent wallets, send payments between agents, and manage credits. Base URL: https://api.amillipay.com
Install the SDK:
npm install @amillipay/sdk
Initialize and make your first payment:
import AmilliPay from '@amillipay/sdk'
const pay = new AmilliPay(process.env.AMILLIPAY_API_KEY)
// Create an agent wallet
const agent = await pay.agents.create({ name: 'My Bot' })
// Fund it ($10 = 10,000 credits)
await pay.deposit({ agent_id: agent.id, amount_usd: 10 })
// Send a payment
await pay.send({
from: agent.id,
to: 'agt_search_service_id',
amount: 10, // credits
memo: 'Search query'
})All API requests require your API key in the Authorization header:
Authorization: Bearer amp_your_api_key_here
AMILLIPAY uses a credit system for micro-payments. 1 credit = $0.001 USD.
$1.00 = 1,000 credits $10.00 = 10,000 credits $100 = 100,000 credits Minimum transaction: 1 credit ($0.001) Transaction fee: 1% (minimum 1 credit)
/v1/agentsCreate a new agent wallet
Request body
{
"name": "My Research Bot",
"owner_id": "user_123",
"metadata": { "type": "research" }
}Response
{
"id": "agt_abc123",
"name": "My Research Bot",
"owner_id": "user_123",
"balance": 0,
"created_at": "2026-06-08T00:00:00Z"
}/v1/agents/:idGet agent balance and info
Response
{
"id": "agt_abc123",
"name": "My Research Bot",
"balance": 49990,
"balance_usd": 49.99,
"total_sent": 10,
"total_received": 0
}/v1/paySend payment between agents
Request body
{
"from": "agt_abc123",
"to": "agt_search_service",
"amount": 10,
"memo": "Web search: Tesla Q4"
}Response
{
"id": "txn_xyz789",
"from": "agt_abc123",
"to": "agt_search_service",
"amount": 10,
"fee": 0.1,
"status": "completed",
"created_at": "2026-06-08T00:00:00Z"
}/v1/transactionsList transactions for an agent
Response
{
"transactions": [
{
"id": "txn_xyz789",
"from": "agt_abc123",
"to": "agt_search_service",
"amount": 10,
"memo": "Web search: Tesla Q4",
"created_at": "2026-06-08T00:00:00Z"
}
],
"total": 1
}/v1/depositAdd credits to an agent wallet
Request body
{
"agent_id": "agt_abc123",
"amount_usd": 50.00
}Response
{
"checkout_url": "https://checkout.stripe.com/...",
"credits": 50000,
"amount_usd": 50.00
}/v1/withdrawCash out credits to bank
Request body
{
"agent_id": "agt_abc123",
"amount": 10000,
"bank_account": "ba_xxx"
}Response
{
"id": "wth_abc123",
"amount_credits": 10000,
"amount_usd": 10.00,
"fee_usd": 0.10,
"status": "processing"
}AMILLIPAY sends webhooks when payments are sent or received. Configure your webhook URL in the dashboard.
// Webhook payload
{
"event": "payment.completed",
"data": {
"id": "txn_xyz789",
"from": "agt_abc123",
"to": "agt_search_service",
"amount": 10,
"memo": "Web search: Tesla Q4",
"created_at": "2026-06-08T00:00:00Z"
}
}