Skip to main content

Agent Network

Agents are local businesses authorized to handle cash transactions for OLIVE users.

Agent Types

TypeDescription
super_agentTop-level agent (bank, large business). Cannot have parent.
sub_agentIndividual shop/kiosk. Must have parent_agent_id.

Agent Status

StatusDescription
activeCan perform transactions (default)
inactiveAccount dormant
suspendedTemporarily blocked by admin

Commission Tiers

TierTop-up RateWithdrawal Rate
11.0%0.5%
21.5%0.75%
32.0%Higher
Tier must be 1, 2, or 3.

Settlement Modes

ModeDescription
instantCommission paid immediately (default)
weeklyAccumulated, paid weekly
monthlyAccumulated, paid monthly

Agent Fields

FieldTypeDescription
idTEXTUnique agent ID
agent_typeTEXTsuper_agent or sub_agent
parent_agent_idTEXTFor sub-agents (FK to agents)
agent_nameTEXTDisplay name
business_nameTEXTRegistered business name
contact_personTEXTPrimary contact
phone_numberTEXTUnique phone
emailTEXTBusiness email
business_addressTEXTPhysical address
districtTEXTSierra Leone district
locationTEXTLocation description
float_balanceINTEGERWorking capital (SLE)
balanceBIGINTAccount balance
commission_tierINTEGER1, 2, or 3
tier_levelINTEGERLegacy tier field
settlement_modeTEXTinstant/weekly/monthly
kyc_documentsTEXTKYC doc URLs
kyc_document_urlTEXTPrimary KYC doc
agent_pin_hashTEXTPIN hash (SHA256)
statusTEXTactive/inactive/suspended
created_atTIMESTAMPRegistration date

Validation Rules

Super Agent:
  • Cannot have parent_agent_id
  • Business name required
  • Contact person required
  • Phone required
  • Commission tier 1-3
Sub Agent:
  • Must have parent_agent_id
  • Same field requirements as super agent

Float Operations

OperationEffect on Float
Cash-in from customerDecreases
Cash-out to customerIncreases
Float transfer from superIncreases
Float transfer to subDecreases

Agent PIN

Every agent has a 4-digit PIN:
  • Hashed: SHA256(pin) (no salt)
  • Required for transaction authorization
  • Validated before any float operation