Skip to main content

Payment Export

This page documents the payment data export features.

Overview

The export module allows you to:

  • Generate files for payment operators
  • Export payment reports
  • Download beneficiary lists

Export Endpoints

EndpointMethodDescription
/api/cycles/{id}/exportGETExport payments for a cycle
/api/cycles/{id}/export/stGETExport ST format (operator)
/api/export/paiementsGETGeneral payment export
/api/export/paiements/reconciliationGETExport for reconciliation

Cycle Export

Endpoint

GET /api/cycles/{id}/export

Parameters

ParameterTypeDescription
formatstringcsv or xlsx (default: csv)
statutstringFilter by payment status

Response

CSV/Excel file containing:

ColumnDescription
ReferencePayment reference
BeneficiaryBeneficiary name
Beneficiary codeUnique code
PhonePhone number
AmountAmount to pay
Payment methodMobile Money, Transfer, etc.
AccountAccount or mobile number
StatusPending, Paid, Failed
DatePayment date

ST Format Export (Operator)

Endpoint

GET /api/cycles/{id}/export/st

Description

Specific format for transmission to money transfer operators.

File Structure

CODE_BENEFICIAIRE;NOM;PRENOM;TELEPHONE;MONTANT;MODE
BEN-OIO-2025-001;DIALLO;Mamadou;+245955123456;15000;MOBILE_MONEY
BEN-OIO-2025-002;SANE;Fatou;+245966789012;15000;MOBILE_MONEY

Columns

ColumnFormatDescription
CODE_BENEFICIAIREStringUnique code
NOMStringLast name
PRENOMStringFirst name
TELEPHONEStringFormat +245XXXXXXXXX
MONTANTIntegerAmount in XOF
MODEStringMOBILE_MONEY or VIREMENT

General Export

Endpoint

GET /api/export/paiements

Parameters

ParameterTypeDescription
dateDebutdateStart date
dateFindateEnd date
cycleUUIDFilter by cycle
programmeUUIDFilter by program
regionUUIDFilter by region
statutstringFilter by status
formatstringcsv or xlsx

Example

GET /api/export/paiements?dateDebut=2026-01-01&dateFin=2026-06-30&format=xlsx

Response

Excel file with all payments matching the filters.


Reconciliation Export

Endpoint

GET /api/export/paiements/reconciliation

Description

Specific format for reconciliation with operator return files.

Structure

ColumnDescription
idPayment ID
referenceUnique reference
beneficiaire_idBeneficiary ID
telephoneNormalized number
montantAmount
statut_actuelSystem status
date_soumissionSubmission date

Permissions

ExportRequired Permission
Cycle exporttransferts.cycles_view
ST exporttransferts.cycles_export
General exporttransferts.paiements_view
Reconciliation exporttransferts.reconciliation_view

Limits

TypeLimit
Number of rows50,000 max per export
Period12 months max
File size50 MB max

Output Formats

CSV

  • Encoding: UTF-8
  • Separator: Semicolon (;)
  • Quotes: For text fields

Excel (XLSX)

  • Format: Office Open XML
  • Single sheet
  • Bold headers

Operator Export Workflow

┌────────────────────┐
│ 1. Validate cycle │
└─────────┬──────────┘

┌────────────────────┐
│ 2. ST Export │
└─────────┬──────────┘

┌────────────────────┐
│ 3. Transmit to │
│ operator │
└─────────┬──────────┘

┌────────────────────┐
│ 4. Receive return │
│ file │
└─────────┬──────────┘

┌────────────────────┐
│ 5. Import reconci- │
│ liation │
└────────────────────┘

Code Examples

CSV Export with Filters

curl -X GET "https://api.example.com/api/export/paiements?cycle=xxx&format=csv" \
-H "Authorization: Bearer TOKEN" \
-o cycle_payments.csv

Excel Export

curl -X GET "https://api.example.com/api/cycles/xxx/export?format=xlsx" \
-H "Authorization: Bearer TOKEN" \
-o cycle_payments.xlsx

Error Codes

CodeHTTPDescription
NO_DATA404No data to export
TOO_MANY_RECORDS400Too many rows (>50000)
INVALID_FORMAT400Unsupported format
FORBIDDEN403Insufficient permission