Exports
Payouts, collections and refunds as CSV files, for accounting and reconciliation.
The response is text/csv with a Content-Disposition filename. from is included and to is not; up to 366 days and 50,000 rows per file.
Numbers are masked as in the API, and cells that start with = + - or @ are prefixed with ' so spreadsheets never run them.
Send your API key as Authorization: Bearer apk_test_… (sandbox) or apk_live_… (live). Each endpoint lists the scope the key needs. See API keys.
Export payouts
/api/v1/exports/payoutspayouts:readEvery payout created in the period, oldest first, as CSV.
fromstringrequiredISO 8601 start (included).
tostringrequiredISO 8601 end (not included).
curl "https://api.autopayke.com/api/v1/exports/payouts" \
-H "Authorization: Bearer $AUTOPAYKE_API_KEY"id,created,status,amount_kes,currency,...
- Returns CSV, not JSON. Errors still come back as the usual JSON error.
Export collections
/api/v1/exports/collectionscollections:readEvery collection created in the period, oldest first, as CSV.
fromstringrequiredISO 8601 start (included).
tostringrequiredISO 8601 end (not included).
curl "https://api.autopayke.com/api/v1/exports/collections" \
-H "Authorization: Bearer $AUTOPAYKE_API_KEY"id,created,status,amount_kes,currency,...
- Returns CSV, not JSON. Errors still come back as the usual JSON error.
Export refunds
/api/v1/exports/refundsrefunds:readEvery refund created in the period, oldest first, as CSV.
fromstringrequiredISO 8601 start (included).
tostringrequiredISO 8601 end (not included).
curl "https://api.autopayke.com/api/v1/exports/refunds" \
-H "Authorization: Bearer $AUTOPAYKE_API_KEY"id,created,status,amount_kes,currency,...
- Returns CSV, not JSON. Errors still come back as the usual JSON error.