Skip to main content

Fund Agent

POST/agents/{id}/fundOpen in the API playground →
Info

Adds float balance to an agent's account. System admins can fund any agent. Super-agents can only fund their sub-agents.

Request

Authorizationstringheaderrequired

Bearer olive_live_xxx or Bearer eyJ... (JWT)

Path Parameters

idstringpathrequired

Agent UUID to fund (e.g., agent_abc123)

Body Parameters

amountstringbodyrequired

Amount to add (e.g., 500000.00 or 500000)

descriptionstringbody

Funding description/reference


Response

successboolean

Whether funding succeeded

transaction_idstring

Funding transaction ID

new_balancestring

Agent's new float balance


Examples

Request
cURL
curl -X POST "https://demo.api.vultlocal.com/api/v1/agents/agent_abc123/fund" \
-H "Authorization: Bearer olive_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"amount": "500000.00",
"description": "Weekly float top-up"
}'
Response
200 Success
{
"success": true,
"message": "Agent funded successfully",
"transaction_id": "txn_fund_abc123",
"amount": "500,000.00 SLE",
"new_balance": "1,500,000.00 SLE",
"funded_by": "admin@smartpay.sl"
}
403 Forbidden
{
"error": "Not authorized to fund this agent",
"code": "FORBIDDEN"
}

Funding Sources

SmartPay Admin

System admin funds from SmartPay pool

Super-Agent

Super-agent transfers own float to sub-agent


Permissions

Funder RoleCan Fund
System AdminAny agent
Super-AgentOwn sub-agents only
Sub-AgentNone

Errors

StatusCodeDescription
400INVALID_AMOUNTInvalid amount format
401UNAUTHORIZEDInvalid API key
403FORBIDDENNot authorized to fund
403INSUFFICIENT_FLOATSuper-agent has insufficient balance
404NOT_FOUNDAgent not found
500INTERNAL_ERRORServer error