Skip to main content
POST
/
api
/
v1
/
billing
/
inquiry
Consulter une facture
curl --request POST \
  --url https://api-m.dexchange.sn/api/v1/billing/inquiry \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "serviceCode": "SENELEC_SN_BILL",
  "reference_client": "210278816"
}
'
{
  "success": true,
  "referenceClient": "210278816",
  "bills": [
    {
      "paymentTransactionNumber": "<string>",
      "referenceClient": "000210278816",
      "referenceFacture": "8000000680",
      "nom": "FALL OUSSEYNOU",
      "prenom": "<string>",
      "montant": 104500,
      "frais": 0,
      "total": 104500,
      "dateEcheance": "2018-12-31",
      "paid": false,
      "address": "<string>",
      "meterStatus": "<string>"
    }
  ]
}

Bill Inquiry

Retrieves bill information (amount due) or meter details before a bill payment / top-up.
This step is optional but recommended: it lets you display the bill (or meter status) to your user before paying. The payment endpoint performs an internal inquiry anyway.

Endpoint

POST /api/v1/billing/inquiry

Headers

NameTypeRequiredDescription
AuthorizationstringYesBearer YOUR_API_KEY
Content-TypestringYesapplication/json

Request Body

{
  "serviceCode": string,        // Billing service code
  "reference_client": string    // Meter number / customer reference
}

Parameters

ParameterTypeRequiredDescription
serviceCodestringYesBiller code (see table below)
reference_clientstringYesMeter number / police / customer reference to look up

Available billing services

serviceCodeBillerTypeAmount
SENEAU_SN_BILLSenEauWater bill (postpaid)Fixed
SENELEC_SN_BILLSenelecPostpaid electricity billFixed
WOYOFAL_SN_BILLWoyofalPrepaid electricity top-upCustomer-chosen

Response

Successful Response

{
  "success": true,
  "referenceClient": "210278816",
  "bills": [
    {
      "paymentTransactionNumber": null,
      "referenceClient": "000210278816",
      "referenceFacture": "8000000680",
      "nom": "FALL OUSSEYNOU",
      "prenom": null,
      "montant": 104500,
      "frais": 0,
      "total": 104500,
      "dateEcheance": "2018-12-31",
      "paid": false,
      "address": null,
      "meterStatus": null
    }
  ]
}
For Woyofal (prepaid top-up), bills[0] represents the meter: montant is 0 (the customer chooses the amount at payment), and meterStatus / address / nom describe the meter.

bills[] fields

FieldTypeDescription
referenceClientstringMeter number
referenceFacturestringBill reference (SenEau/Senelec) or session token (Woyofal)
nomstringAccount holder name (if available)
montantnumberBill amount (0 for customer-chosen top-ups)
fraisnumberProvider fee (informational)
totalnumbermontant + frais
dateEcheancestringDue date (postpaid bills)
paidbooleantrue if the bill is already settled
addressstringMeter address (Woyofal)
meterStatusstringMeter status (Woyofal)

Error Response

{
  "success": false,
  "message": "No bill found",
  "bills": []
}

Error Codes

HTTP CodeDescription
400Invalid parameters / bill not found
401Invalid API key
403API under maintenance

Request Example

curl -X POST https://api-m.dexchange.sn/api/v1/billing/inquiry \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "serviceCode": "SENELEC_SN_BILL",
    "reference_client": "210278816"
  }'

Authorizations

Authorization
string
header
required

Entrez votre clé API comme: Bearer <API_KEY>

Body

application/json

Référence à consulter

serviceCode
enum<string>
required

Code du biller

Available options:
SENEAU_SN_BILL,
SENELEC_SN_BILL,
WOYOFAL_SN_BILL
Example:

"SENELEC_SN_BILL"

reference_client
string
required

Numéro de compteur / police / référence client

Example:

"210278816"

Response

Facture(s) trouvée(s)

success
boolean
Example:

true

referenceClient
string
Example:

"210278816"

bills
object[]