API · Partners

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.

Cash kiosksagt_

Endpoints

POST/v1/agents

Onboard a new agent into your sub-network.

GET/v1/agents

List agents in your network.

GET/v1/agents/{id}

Retrieve an agent + their current float, liquidity, status.

POST/v1/agents/{id}/approve

Approve a pending agent (KYC complete).

POST/v1/agents/{id}/deposits

Record a prepay deposit (credits the agent's float).

POST/v1/agents/{id}/credit-line

Set or update the agent's postpay credit line.

POST/v1/agents/{id}/transactions

Direct ledger transaction at an agent (commission, adjustment).

POST/v1/cashouts

Issue a one-time cashout code redeemable at any agent.

GET/v1/cashouts/{code}

Status of a cashout code (open, claimed, expired).

Onboarding

NameTypeDescription
full_name
required
stringAgent operator name.
msisdn
required
E.164Login + agent-app phone.
national_id
required
stringGovernment ID number.
locationobject{ city, district, latitude, longitude } — drives geo-fencing.
liquidity_modelenum"prepay" (default) or "credit". Credit-line agents need credit_limit set.
credit_limit_minorintegerRequired 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.

POST /v1/agents/{id}/transactions · collectbash
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.

POST /v1/cashoutsbash
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
  }'
201 Createdjson
{
  "id": "co_01HZ...",
  "code": "473821",
  "amount_minor": 25000,
  "currency": "DJF",
  "status": "open",
  "expires_at": "2026-05-26T10:15:30Z"
}

Sub-merchant networks

Big merchants (telcos, MTOs, retail chains) can run their own agent sub-network under MerasPay. Float, commissions, geo-fencing rules, and settlement all happen within your sub-network; reporting rolls up to your merchant account.