Skip to content

Settlements

The SettlementResource allows you to gain insights into payouts made by Paystack to your bank account. You can list settlements and view the transactions that make up a specific settlement.

List Settlements

List settlements made to your settlement accounts.

php

// List all settlements
$settlements = paystack()->settlement()->list();

// Filter settlements
$filtered = paystack()->settlement()->list([
    'status' => 'success',
    'from' => '2023-01-01',
    'to' => '2023-12-31'
]);

Parameters

ParameterTypeRequiredDescription
perPageIntegerNoSpecify how many records you want to retrieve per page. Defaults to 50.
pageIntegerNoSpecify exactly what page you want to retrieve. Defaults to 1.
statusStringNoFetch settlements based on their state. Values: success, processing, pending, failed.
subaccountStringNoProvide a subaccount ID to export only settlements for that subaccount.
fromDateNoA timestamp from which to start listing settlements.
toDateNoA timestamp at which to stop listing settlements.

List Settlement Transactions

Get the transactions that make up a particular settlement.

php
$settlementId = 3090024;

$transactions = paystack()->settlement()->transactions($settlementId, [
    'perPage' => 20
]);

Parameters

ParameterTypeRequiredDescription
idStringYesThe settlement ID.
perPageIntegerNoSpecify how many records you want to retrieve per page.
pageIntegerNoSpecify exactly what page you want to retrieve.
fromDateNoA timestamp from which to start listing transactions.
toDateNoA timestamp at which to stop listing transactions.

Use Cases

Reconciling Payouts

You can use the transactions method to reconcile the total amount settled to your bank account with the individual transactions processed on your site.

php
$settlementId = 3090024;
$settlementTransactions = paystack()->settlement()->transactions($settlementId);

$totalCalculated = 0;
foreach ($settlementTransactions['data'] as $transaction) {
    $totalCalculated += $transaction['amount'];
}

// Compare $totalCalculated with the settlement total

Tracking Pending Settlements

Monitor settlements that are yet to be paid out.

php
$pendingSettlements = paystack()->settlement()->list([
    'status' => 'pending'
]);

Released under the MIT License.