Agent network
MerasPay's field agent kiosks handle cash-in / cash-out for customers without a bank or wallet account. As a merchant you can settle cash orders through any agent, or top up customer wallets in person via your own agent network.
Endpoints
/v1/agentsOnboard a new agent into your sub-network.
/v1/agentsList agents in your network.
/v1/agents/{id}Retrieve an agent + their current float, liquidity, status.
/v1/agents/{id}/approveApprove a pending agent (KYC complete).
/v1/agents/{id}/depositsRecord a prepay deposit (credits the agent's float).
/v1/agents/{id}/credit-lineSet or update the agent's postpay credit line.
/v1/agents/{id}/transactionsDirect ledger transaction at an agent (commission, adjustment).
/v1/cashoutsIssue a one-time cashout code redeemable at any agent.
/v1/cashouts/{code}Status of a cashout code (open, claimed, expired).
Onboarding
| Name | Type | Description |
|---|---|---|
full_namerequired | string | Agent operator name. |
msisdnrequired | E.164 | Login + agent-app phone. |
national_idrequired | string | Government ID number. |
location | object | { city, district, latitude, longitude } — drives geo-fencing. |
liquidity_model | enum | "prepay" (default) or "credit". Credit-line agents need credit_limit set. |
credit_limit_minor | integer | Required when liquidity_model="credit". |
Cash-in (collect)
Agent collects cash from a customer and credits the customer's wallet. The agent app calls this endpoint with the agent's session token; we debit the agent's float by the same amount.
curl -X POST https://api.merashub.com/v1/agents/agt_01HZ.../transactions \
-H "Authorization: Bearer <agent-session-jwt>" \
-d '{
"kind": "collect",
"amount": 25000,
"currency": "DJF",
"customer_msisdn": "+25377xxxxxxx",
"customer_provider": "waafi"
}'Cash-out (distribute)
Issue a one-time cashout code (6-digit numeric) to a customer; they walk into any agent and present the code + their ID; the agent redeems it for cash. The code is single-use, expires after 24h by default, and is scoped to a specific amount + currency.
curl -X POST https://api.merashub.com/v1/cashouts \
-H "Authorization: Bearer sk_test_..." \
-d '{
"amount": 25000,
"currency": "DJF",
"recipient_msisdn": "+25377xxxxxxx",
"expires_in_seconds": 86400
}'{
"id": "co_01HZ...",
"code": "473821",
"amount_minor": 25000,
"currency": "DJF",
"status": "open",
"expires_at": "2026-05-26T10:15:30Z"
}Sub-merchant networks