Funding Agent Wallets
Before an agent can make payments, its wallet needs funds. The human owner completes a payment via UPI, card, or netbanking — the money is credited to the agent’s wallet instantly after payment confirmation.
How It Works
Create a Funding Order
cURL
Python SDK
MCP (natural language)
curl -X POST https://api.amrood.io/v1/agents/agt_xxx/fund \
-H "x-agent-key: agk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"amount": 5000,
"method": "upi"
}'
Request Body
Field Type Required Description amountnumber Yes Amount in INR (minimum ₹1) methodstring No "upi", "card", "netbanking", or "link" (default: "link")
Response
{
"funding_id" : "fund_abc123" ,
"payment_session_id" : "session_xyz" ,
"order_id" : "fund_abc123" ,
"status" : "pending"
}
The payment_session_id is used to redirect the owner to the Cashfree hosted checkout. For web integrations, redirect to:
https://amrood.io/payment/{payment_session_id}
Check Funding Status
curl https://api.amrood.io/v1/agents/agt_xxx/fund/fund_abc123 \
-H "x-agent-key: agk_live_xxx"
Funding Statuses
Status Description pendingPayment order created, waiting for owner to pay completedPayment received, agent balance credited failedPayment failed or expired
UPI Collect
For server-side UPI collect (no redirect needed), provide the owner’s UPI ID:
curl -X POST https://api.amrood.io/api/web/fund/agt_xxx/upi \
-H "x-agent-key: agk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"amount": 1000,
"upi_id": "owner@upi"
}'
A collect request is sent to the owner’s UPI app. They approve it and the funds are credited automatically via webhook.
Webhook Notification
When the payment succeeds, Amrood fires an agent.funded webhook to your platform’s registered URL:
{
"event" : "agent.funded" ,
"data" : {
"agent_id" : "agt_xxx" ,
"amount" : 5000 ,
"funding_id" : "fund_abc123"
}
}
See Webhooks for verification and retry details.
Fees
Funding via the payment gateway incurs a 2.5% PG fee charged by Cashfree. This is deducted from the payment amount before crediting.
Method Fee UPI 2.5% Card 2.5% Netbanking 2.5%
There is no Amrood platform fee on funding. The 2.5% is the standard Cashfree payment gateway charge.