Settlement Transactions
In a nutshell
To reconcile a payout, get every transaction in its settlement. You can export them with the API, page through them, or export them from the Dashboard.
Getting started
A settlement contains the transactions we paid out to you in one payout. To reconcile a settlement, get the list of those transactions. Choose the approach that fits the size of the settlement:
- Export with the API when you want one CSV file for a settlement of normal size.
- Page through the transactions when the settlement is large, or an export request times out.
- Export from the dashboard when you don't need to automate the download.
No settlement export endpoint
There's no /settlement/:id/transactions/export endpoint. To export a settlement, use one of the approaches on this page.
Get the settlement ID
Each approach needs the ID of the settlement. List your settlements with the List SettlementsAPI endpoint and take the id of the one you want:
1curl "https://api.paystack.co/settlement?from=2026-11-01T00:00:00.000Z&to=2026-11-04T23:59:59.000Z&status=success" \2-H "Authorization: Bearer YOUR_SECRET_KEY"
- Use full timestamps for
fromandto, as in the example. statusacceptspending,successorfailed. Leave it out to list settlements of every status. This endpoint doesn't acceptstatus=all.- To list a subaccount's settlements, add
subaccountwith the subaccount's ID. - The endpoint returns results in pages. If you don't see the settlement, request the next
page.
Export a settlement with the API
To export a settlement, call the Export TransactionsAPI endpoint with the settlement ID in settlement:
1curl "https://api.paystack.co/transaction/export?settlement=SETTLEMENT_ID" \2-H "Authorization: Bearer YOUR_SECRET_KEY"
When you pass settlement, we export every transaction in the settlement and ignore from and to.
The response includes a link to a CSV file in data.path:
1{2 "status": true,3 "message": "Export successful",4 "data": {5 "path": "https://s3.eu-west-1.amazonaws.com/files.paystack.co/exports/463433/transactions/Integration_name_transactions_1724324423843.csv?X-Amz-Expires=60&...",6 "expiresAt": "2024-08-22 11:01:23"7 }8}
The link expires about 60 seconds after we create it, at the time in data.expiresAt. Download the file in the same job that requests the export.
Don't store the link to use later. If the link expires, request a new export.
Large settlements
We create the export file while your request waits. A large settlement can take long enough that the request times out. If that happens, page through the transactions instead.
Page through a high-volume settlement
The List TransactionsAPI endpoint returns the transactions in a settlement one page at a time, so it works for settlements of any size.
Pass the settlement ID in settlement, with perPage=100 and page=1:
1curl "https://api.paystack.co/transaction?settlement=SETTLEMENT_ID&perPage=100&page=1" \2-H "Authorization: Bearer YOUR_SECRET_KEY"
Page-based requests return pageCount in the meta object, which is the number of pages in the settlement. Increase page by 1 for each request until you've fetched pageCount pages:
1const PER_PAGE = 100;2const MAX_ATTEMPTS = 3;34const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));56async function fetchPage(settlementId, page) {7 for (let attempt = 1; ; attempt++) {8 const response = await fetch(9 `https://api.paystack.co/transaction?settlement=${settlementId}&perPage=${PER_PAGE}&page=${page}`,10 { headers: { Authorization: 'Bearer YOUR_SECRET_KEY' } }11 );1213 if (response.ok) return response.json();1415 const body = await response.json().catch(() => ({}));16 const canRetry = response.status === 429 || response.status >= 500;1718 if (!canRetry || attempt === MAX_ATTEMPTS) {19 throw new Error(`Page ${page} failed with status ${response.status}: ${body.message ?? 'no message'}`);20 }2122 // Wait longer after each failed attempt23 await wait(1000 * 2 ** attempt);24 }25}2627async function fetchSettlementTransactions(settlementId) {28 const firstPage = await fetchPage(settlementId, 1);29 const { pageCount } = firstPage.meta;3031 if (typeof pageCount !== 'number') {32 throw new Error('The response has no meta.pageCount. Check that the request uses page and perPage.');33 }3435 const transactions = [...firstPage.data];3637 for (let page = 2; page <= pageCount; page++) {38 const { data } = await fetchPage(settlementId, page);39 transactions.push(...data);40 }4142 return transactions;43}
fetchPage retries a page up to three times when it gets a 429 status, which means you've reached a rate limit, or a server error. It waits longer before each retry. Any other error stops the download and includes the message from the API.
Large settlements need many requests, so keep within the rate limitsAPI.
To learn more about page and perPage, see PaginationAPI.
Export from the dashboard
To get the file by email instead:
- On your Paystack Dashboard, go to Payouts.
- Open the payout you want to reconcile.
- Click Export, then choose Send via email.
We email the file to you when it's ready.
Related resources
- List Settlement TransactionsAPI returns a settlement's transactions one page at a time. It ignores
fromandto. - Export TransactionsAPI describes every filter you can use in an export.