Skip to content

Payout Transactions

Payout transactions represent every line item of a payout. Every payout transaction belongs to a payout resource. Payouts are transfers of funds from your PayRex account to your bank account — they are initiated by PayRex based on your settlement schedule.

Read-Only Resource

Payout transactions are read-only. You can list the transactions within a specific payout, but you cannot create, update, or delete them.

List Payout Transactions

List all transactions within a specific payout. Note that unlike other list methods, payoutTransactions->list() requires a payout ID as the first argument:

php
use LegionHQ\LaravelPayrex\Facades\Payrex;

$transactions = Payrex::payoutTransactions()->list('po_xxxxx', [
    'limit' => 10,
]);

foreach ($transactions->data as $transaction) {
    echo $transaction->transactionType;  // PayoutTransactionType::Payment (enum)
    echo $transaction->amount;           // Amount in cents
    echo $transaction->netAmount;        // Net amount after fees
    echo $transaction->transactionId;    // The related payment/refund ID
}

Returns a list of Payout Transaction resources.

Example Response:

json
{
    "resource": "list",
    "has_more": false,
    "data": [
        {
            "id": "po_txn_xxxxx",
            "resource": "payout_transaction",
            "amount": 4569600,
            "net_amount": 2664200,
            "transaction_id": "pay_xxxxx",
            "transaction_type": "payment",
            "created_at": 1747235098,
            "updated_at": 1747263620
        },
        {
            "id": "po_txn_yyyyy",
            "resource": "payout_transaction",
            "amount": -500000,
            "net_amount": -500000,
            "transaction_id": "re_xxxxx",
            "transaction_type": "refund",
            "created_at": 1747235200,
            "updated_at": 1747263700
        }
    ]
}

Pagination Parameters

ParameterTypeDescription
limitintNumber of items to return
afterstringReturn items after this resource ID (forward pagination)
beforestringReturn items before this resource ID (backward pagination)

Pagination

Payout transactions use manual cursor pagination via list() — the paginate() convenience method is not available for this resource because it requires a payout ID:

php
// Manual cursor pagination
$page1 = Payrex::payoutTransactions()->list('po_xxxxx', ['limit' => 10]);

if ($page1->hasMore) {
    $lastId = end($page1->data)->id;
    $page2 = Payrex::payoutTransactions()->list('po_xxxxx', ['limit' => 10, 'after' => $lastId]);
}

See Pagination for more details on cursor-based pagination.

Payout Transaction Resource

FieldTypeDescription
idstringUnique identifier (po_txn_ prefix)
resourcestringAlways payout_transaction
amountintegerTransaction amount in cents (negative for refunds)
net_amountintegerNet amount after fees in cents
transaction_idstringThe related payment (pay_) or refund (re_) ID
transaction_typePayoutTransactionTypepayment, refund, or adjustment (enum)
created_atintegerUnix timestamp
updated_atintegerUnix timestamp

Property Access

Response field names above are shown in snake_case (matching the raw API response). In PHP, access them as camelCase typed properties on the DTO — e.g., transaction_type becomes $transaction->transactionType. See Response Data for details.

Transaction Types

TypeDescriptionAmount
paymentA successful payment included in the payoutPositive
refundA refund deducted from the payoutNegative
adjustmentA platform adjustment (e.g., fee corrections, manual adjustments)Positive or negative

Payouts vs. Payout Transactions

The PayRex API has two related resources:

  • Payouts — Represent the overall transfer of funds from your PayRex account to your bank account. Payouts are initiated by PayRex based on your settlement schedule and are managed through the PayRex Dashboard. This package does not wrap the Payouts resource directly.
  • Payout Transactions — The individual line items within a payout (payments and refunds). This is what this page documents.

To view your payouts, use the PayRex Dashboard or the payout ID (po_ prefix) to list its transactions via this package.

Events Resource

PayRex also has an Events API for fetching event history. This package doesn't wrap it — use webhook listeners instead, which give you the same data in real time with typed event classes.

Further Reading

Released under the MIT License.