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
| Endpoint | Method | Description |
|---|---|---|
/api/cycles/{id}/export | GET | Export payments for a cycle |
/api/cycles/{id}/export/st | GET | Export ST format (operator) |
/api/export/paiements | GET | General payment export |
/api/export/paiements/reconciliation | GET | Export for reconciliation |
Cycle Export
Endpoint
GET /api/cycles/{id}/export
Parameters
| Parameter | Type | Description |
|---|---|---|
format | string | csv or xlsx (default: csv) |
statut | string | Filter by payment status |
Response
CSV/Excel file containing:
| Column | Description |
|---|---|
| Reference | Payment reference |
| Beneficiary | Beneficiary name |
| Beneficiary code | Unique code |
| Phone | Phone number |
| Amount | Amount to pay |
| Payment method | Mobile Money, Transfer, etc. |
| Account | Account or mobile number |
| Status | Pending, Paid, Failed |
| Date | Payment 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
| Column | Format | Description |
|---|---|---|
| CODE_BENEFICIAIRE | String | Unique code |
| NOM | String | Last name |
| PRENOM | String | First name |
| TELEPHONE | String | Format +245XXXXXXXXX |
| MONTANT | Integer | Amount in XOF |
| MODE | String | MOBILE_MONEY or VIREMENT |
General Export
Endpoint
GET /api/export/paiements
Parameters
| Parameter | Type | Description |
|---|---|---|
dateDebut | date | Start date |
dateFin | date | End date |
cycle | UUID | Filter by cycle |
programme | UUID | Filter by program |
region | UUID | Filter by region |
statut | string | Filter by status |
format | string | csv 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
| Column | Description |
|---|---|
| id | Payment ID |
| reference | Unique reference |
| beneficiaire_id | Beneficiary ID |
| telephone | Normalized number |
| montant | Amount |
| statut_actuel | System status |
| date_soumission | Submission date |
Permissions
| Export | Required Permission |
|---|---|
| Cycle export | transferts.cycles_view |
| ST export | transferts.cycles_export |
| General export | transferts.paiements_view |
| Reconciliation export | transferts.reconciliation_view |
Limits
| Type | Limit |
|---|---|
| Number of rows | 50,000 max per export |
| Period | 12 months max |
| File size | 50 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
| Code | HTTP | Description |
|---|---|---|
NO_DATA | 404 | No data to export |
TOO_MANY_RECORDS | 400 | Too many rows (>50000) |
INVALID_FORMAT | 400 | Unsupported format |
FORBIDDEN | 403 | Insufficient permission |