Skip to main content

Operator Accounts API

The Operator Accounts API allows managing Mobile Money operator accounts and tracking their financial movements.

Overview

EndpointMethodDescription
/api/comptes-operateursGETList of accounts
/api/comptes-operateurs/{id}GETAccount details
/api/comptes-operateursPOSTCreate an account
/api/comptes-operateurs/{id}PUTModify an account
/api/comptes-operateurs/{id}DELETEDelete an account
/api/comptes-operateurs/operateursGETList of operators
/api/comptes-operateurs/statsGETGlobal statistics
/api/comptes-operateurs/alertesGETBalance alerts
/api/comptes-operateurs/by-projet-operateurGETAccount by project/operator
/api/comptes-operateurs/{id}/depotsPOSTRecord a deposit
/api/comptes-operateurs/{id}/mouvementsGETMovement history
/api/comptes-operateurs/{id}/statsGETAccount statistics
/api/comptes-operateurs/{id}/recalculerPOSTRecalculate balance

List operator accounts

Endpoint

GET /api/comptes-operateurs

Query parameters

ParameterTypeRequiredDescription
pageintNoPage number (default: 1)
limitintNoItems per page (default: 20)
operateurstringNoFilter by operator (orange_money, mtn_money)
projetUUIDNoFilter by project
statutstringNoFilter by status (actif, inactif)
searchstringNoText search

Response

{
"success": true,
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"code": "OM-PCH-001",
"operateur": "orange_money",
"operateurLabel": "Orange Money",
"numeroCompte": "955123456",
"nomCompte": "PCH Payments Oio",
"projet": {
"id": "...",
"nom": "PCH Guinea-Bissau"
},
"solde": 125000000,
"soldeMinimum": 10000000,
"devise": "XOF",
"statut": "actif",
"alerteSolde": false,
"dernierDepot": "2025-03-10T14:30:00+00:00",
"dernierPaiement": "2025-03-15T09:00:00+00:00",
"createdAt": "2025-01-01T08:00:00+00:00"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 8,
"pages": 1
}
}

Account details

Endpoint

GET /api/comptes-operateurs/{id}

Response

{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"code": "OM-PCH-001",
"operateur": "orange_money",
"operateurLabel": "Orange Money",
"numeroCompte": "955123456",
"nomCompte": "PCH Payments Oio",
"description": "Main account for Oio region payments",
"projet": {
"id": "...",
"nom": "PCH Guinea-Bissau",
"code": "PCH-GW"
},
"solde": 125000000,
"soldeMinimum": 10000000,
"seuilAlerte": 15000000,
"devise": "XOF",
"statut": "actif",
"alerteSolde": false,
"contacts": {
"responsable": "Mamadou Diallo",
"telephone": "+245955789012",
"email": "m.diallo@pch.gw"
},
"dernierDepot": {
"date": "2025-03-10T14:30:00+00:00",
"montant": 50000000,
"reference": "DEP-2025-0045"
},
"dernierPaiement": {
"date": "2025-03-15T09:00:00+00:00",
"montant": 12500000,
"cycleId": "..."
},
"statsResume": {
"totalDepots": 450000000,
"totalPaiements": 325000000,
"nombrePaiements": 13000
},
"createdAt": "2025-01-01T08:00:00+00:00",
"updatedAt": "2025-03-15T09:00:00+00:00"
}
}

Create an account

Endpoint

POST /api/comptes-operateurs

Request body

{
"operateur": "orange_money",
"numeroCompte": "955123456",
"nomCompte": "PCH Payments Oio",
"description": "Main account for Oio region payments",
"projetId": "550e8400-e29b-41d4-a716-446655440001",
"soldeInitial": 0,
"soldeMinimum": 10000000,
"seuilAlerte": 15000000,
"contacts": {
"responsable": "Mamadou Diallo",
"telephone": "+245955789012",
"email": "m.diallo@pch.gw"
}
}

Available operators

OperatorLabelDescription
orange_moneyOrange MoneyOrange Money Guinea-Bissau
mtn_moneyMTN Mobile MoneyMTN Mobile Money
waveWaveWave
free_moneyFree MoneyFree Money

Response

{
"success": true,
"message": "Operator account created successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"code": "OM-PCH-001"
}
}

List of operators

Endpoint

GET /api/comptes-operateurs/operateurs

Response

{
"success": true,
"data": [
{
"value": "orange_money",
"label": "Orange Money",
"logo": "/images/operators/orange.png",
"actif": true
},
{
"value": "mtn_money",
"label": "MTN Mobile Money",
"logo": "/images/operators/mtn.png",
"actif": true
},
{
"value": "wave",
"label": "Wave",
"logo": "/images/operators/wave.png",
"actif": true
}
]
}

Global statistics

Endpoint

GET /api/comptes-operateurs/stats

Query parameters

ParameterTypeRequiredDescription
projetUUIDNoFilter by project
dateDebutdateNoStart date
dateFindateNoEnd date

Response

{
"success": true,
"data": {
"totalComptes": 8,
"comptesActifs": 7,
"soldeTotal": 850000000,
"devise": "XOF",
"parOperateur": [
{
"operateur": "orange_money",
"label": "Orange Money",
"comptes": 4,
"solde": 500000000
},
{
"operateur": "mtn_money",
"label": "MTN Mobile Money",
"comptes": 3,
"solde": 300000000
}
],
"alertes": {
"soldeFaible": 1,
"inactifs": 1
},
"activiteRecente": {
"depotsJour": 2,
"montantDepotsJour": 75000000,
"paiementsJour": 1500,
"montantPaiementsJour": 37500000
}
}
}

Balance alerts

Endpoint

GET /api/comptes-operateurs/alertes

Response

{
"success": true,
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"code": "OM-PCH-002",
"nomCompte": "PCH Payments Bafata",
"operateur": "orange_money",
"solde": 8000000,
"soldeMinimum": 10000000,
"deficit": 2000000,
"typeAlerte": "solde_critique",
"message": "Balance below minimum required"
}
]
}

Account by project and operator

Endpoint

GET /api/comptes-operateurs/by-projet-operateur

Query parameters

ParameterTypeRequiredDescription
projetIdUUIDYesProject ID
operateurstringYesOperator code

Response

{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"code": "OM-PCH-001",
"solde": 125000000,
"operateur": "orange_money"
}
}

Record a deposit

Endpoint

POST /api/comptes-operateurs/{id}/depots

Request body

{
"montant": 50000000,
"reference": "VIR-2025-0045",
"dateDepot": "2025-03-15",
"source": "Bank transfer",
"notes": "Provisioning for March 2025 cycle",
"pieceJustificative": "optional_file_id"
}

Response

{
"success": true,
"message": "Deposit recorded successfully",
"data": {
"depotId": "550e8400-e29b-41d4-a716-446655440010",
"reference": "DEP-2025-0046",
"montant": 50000000,
"nouveauSolde": 175000000
}
}

Movement history

Endpoint

GET /api/comptes-operateurs/{id}/mouvements

Query parameters

ParameterTypeRequiredDescription
pageintNoPage number
limitintNoItems per page
typestringNoMovement type (depot, paiement, ajustement)
dateDebutdateNoStart date
dateFindateNoEnd date

Response

{
"success": true,
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440020",
"type": "depot",
"typeLabel": "Deposit",
"reference": "DEP-2025-0046",
"montant": 50000000,
"soldeAvant": 125000000,
"soldeApres": 175000000,
"date": "2025-03-15T10:30:00+00:00",
"description": "March 2025 provisioning",
"createdBy": {
"id": "...",
"nom": "Admin User"
}
},
{
"id": "550e8400-e29b-41d4-a716-446655440021",
"type": "paiement",
"typeLabel": "Payment",
"reference": "CYC-2025-003",
"montant": -12500000,
"soldeAvant": 175000000,
"soldeApres": 162500000,
"date": "2025-03-15T14:00:00+00:00",
"description": "March 2025 payment cycle - 500 beneficiaries",
"cycleId": "..."
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 156,
"pages": 8
}
}

Account statistics

Endpoint

GET /api/comptes-operateurs/{id}/stats

Query parameters

ParameterTypeRequiredDescription
periodestringNomonth, quarter, year (default: month)

Response

{
"success": true,
"data": {
"compte": {
"id": "...",
"code": "OM-PCH-001",
"soldeActuel": 162500000
},
"periode": {
"debut": "2025-03-01",
"fin": "2025-03-15"
},
"resume": {
"totalDepots": 100000000,
"nombreDepots": 2,
"totalPaiements": 62500000,
"nombrePaiements": 2500,
"soldeDebut": 125000000,
"soldeFin": 162500000
},
"evolution": [
{"date": "2025-03-01", "solde": 125000000},
{"date": "2025-03-05", "solde": 112500000},
{"date": "2025-03-10", "solde": 162500000},
{"date": "2025-03-15", "solde": 162500000}
],
"moyennePaiementJour": 4166667
}
}

Recalculate balance

Endpoint

POST /api/comptes-operateurs/{id}/recalculer

Description

Recalculates the account balance based on all recorded movements. Useful in case of desynchronization.

Response

{
"success": true,
"message": "Balance recalculated successfully",
"data": {
"ancienSolde": 160000000,
"nouveauSolde": 162500000,
"difference": 2500000,
"nombreMouvements": 156
}
}
warning

This operation may modify the displayed balance. It is recommended only in case of detected inconsistency.