Skip to content

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

GET/api/v1/exports/payouts
API keypayouts:read

Every payout created in the period, oldest first, as CSV.

Query parameters
  • fromstringrequired

    ISO 8601 start (included).

  • tostringrequired

    ISO 8601 end (not included).

Request
curl "https://api.autopayke.com/api/v1/exports/payouts" \
  -H "Authorization: Bearer $AUTOPAYKE_API_KEY"
Response200 application/json
id,created,status,amount_kes,currency,...
Errors

Plus the key and rate errors any keyed call can return.

  • Returns CSV, not JSON. Errors still come back as the usual JSON error.

Export collections

GET/api/v1/exports/collections
API keycollections:read

Every collection created in the period, oldest first, as CSV.

Query parameters
  • fromstringrequired

    ISO 8601 start (included).

  • tostringrequired

    ISO 8601 end (not included).

Request
curl "https://api.autopayke.com/api/v1/exports/collections" \
  -H "Authorization: Bearer $AUTOPAYKE_API_KEY"
Response200 application/json
id,created,status,amount_kes,currency,...
Errors

Plus the key and rate errors any keyed call can return.

  • Returns CSV, not JSON. Errors still come back as the usual JSON error.

Export refunds

GET/api/v1/exports/refunds
API keyrefunds:read

Every refund created in the period, oldest first, as CSV.

Query parameters
  • fromstringrequired

    ISO 8601 start (included).

  • tostringrequired

    ISO 8601 end (not included).

Request
curl "https://api.autopayke.com/api/v1/exports/refunds" \
  -H "Authorization: Bearer $AUTOPAYKE_API_KEY"
Response200 application/json
id,created,status,amount_kes,currency,...
Errors

Plus the key and rate errors any keyed call can return.

  • Returns CSV, not JSON. Errors still come back as the usual JSON error.