Endpoints
Reports
Export collection results for reconciliation
Reports Resource
Export collection results in CSV or JSON format for reconciliation and reporting.
Endpoints
- GET
/reports/collections- Export collection results
Export Collection Results
Export collection results for a specific period.
Endpoint: GET /reports/collections
Query Parameters:
period_month(required) - Format: YYYY-MMformat(optional) - Values:csv,json(default:csv)
Request:
GET /reports/collections?period_month=2025-11&format=csvCSV Response (13 required fields):
period_month,customer_id,external_customer_ref,policy_number,product_code,collection_amount_due,collection_amount_collected,shortfall,collection_status,first_attempt_date,last_attempt_date,number_of_attempts,last_failure_reason
2025-11,CUST001,EXT123,POL001,FUNERAL_01,150.00,150.00,0.00,PAID_FULL,2025-11-05,2025-11-05,1,
2025-11,CUST002,EXT124,POL002,FUNERAL_01,200.00,150.00,50.00,PAID_PARTIAL,2025-11-05,2025-11-28,3,INSUFFICIENT_FUNDSJSON Response:
{
"period_month": "2025-11",
"results": [
{
"period_month": "2025-11",
"customer_id": "CUST001",
"external_customer_ref": "EXT123",
"policy_number": "POL001",
"product_code": "FUNERAL_01",
"collection_amount_due": 150.00,
"collection_amount_collected": 150.00,
"shortfall": 0.00,
"collection_status": "PAID_FULL",
"first_attempt_date": "2025-11-05",
"last_attempt_date": "2025-11-05",
"number_of_attempts": 1,
"last_failure_reason": null
}
]
}Use Case: End-of-month reconciliation and reporting
Agreement Reference: Section 5.2a
CSV Fields
All 13 required fields are included in the CSV export:
| # | Field | Description |
|---|---|---|
| 1 | period_month | Collection period (YYYY-MM) |
| 2 | customer_id | Internal customer identifier |
| 3 | external_customer_ref | Your customer reference |
| 4 | policy_number | Policy identifier |
| 5 | product_code | Product identifier |
| 6 | collection_amount_due | Premium amount due |
| 7 | collection_amount_collected | Amount successfully collected |
| 8 | shortfall | Uncollected amount |
| 9 | collection_status | PAID_FULL / PAID_PARTIAL / UNPAID / CANCELLED |
| 10 | first_attempt_date | Date of first collection attempt |
| 11 | last_attempt_date | Date of most recent attempt |
| 12 | number_of_attempts | Total attempts made |
| 13 | last_failure_reason | Reason for last failure (if any) |
Example Usage
# Export CSV for November 2025
curl "https://api.kasipayments.co.za/v1/reports/collections?period_month=2025-11&format=csv" \
-H "X-API-Key: your-key" \
-o november-collections.csv
# Export JSON for November 2025
curl "https://api.kasipayments.co.za/v1/reports/collections?period_month=2025-11&format=json" \
-H "X-API-Key: your-key" \
-o november-collections.jsonRelated Documentation
- Collections Resource - Execute and query collections
- Settlements Resource - Generate settlements
- Monthly Workflows - Typical monthly cycle
- Full API Reference - Interactive API documentation