Skip to content

Transaction ​

An individual payout transaction for a single affiliate within a payout batch.

Table: fa_payout_transactions
Class: FluentAffiliate\\App\\Models\\Transaction.php

Columns ​

ColumnTypeNullableDefaultDescription
idBIGINT(20)NO—Primary key, auto-increment.
created_byBIGINT(20)YES—WordPress user ID of the admin who created the payout.
affiliate_idBIGINT(20)YES—Affiliate who earned this referral.
payout_idBIGINT(20)YES—Parent payout record.
total_amountDOUBLEYES0Sum of all transactions in this payout.
payout_methodVARCHAR(100)YESmanualDelivery method — manual, paypal, etc.
statusVARCHAR(100)YESpaidRecord status.
currencyCHAR(3)YES—ISO 4217 currency code (e.g. USD).
settingsLONGTEXTYES—Serialized JSON settings blob.
created_atTIMESTAMPYES—Timestamp when the record was created.
updated_atTIMESTAMPYES—Timestamp when the record was last updated.

Relationships ​

MethodTypeTargetDescription
affiliate()belongsToAffiliateAffiliate receiving this payment.
payout()belongsToPayoutParent payout batch.

Query Scopes ​

ScopeDescription
ofStatus($status)Filter by status.

Usage Example ​

php
use FluentAffiliate\App\Models\Transaction;

$paid = Transaction::ofStatus('paid')
    ->where('affiliate_id', $affiliateId)
    ->sum('total_amount');

FluentAffiliate developer documentation