A payment transaction.

A Transaction tracks a payment or refund made to a Client via a specific Invoice.

If the Transaction is a payment by a client toward an invoice, the value of the transaction will be stored in "amountIn."

If the Transaction is a payment by the operator of this WHMCS install to a Client by way of a Refund, the value of the transaction is stored in "amountOut."

class Transaction extends AbstractModel

Properties summary

Type Property Description
protected $table
protected $dates
protected $columnMap
$timestamps
int $id Unique ID number of this transaction.
int $clientId ID of client which made this transaction.
int $invoiceId Internal Invoice ID number to which this transaction applies.
int $refundId Refund ID which is reflected in this invoice.
int $currencyId ID number of currency for which this invoice is calculated.
string $paymentGateway Internal name of payment gateway used to make this transaction.
Carbon $date Date upon which this transaction was made.
string $description Human readable description of this transaction.
string $transactionId Descriptive name for this transaction. Not to be confused with the transaction's Unique ID number. Null if not set.
float $amountIn Gross amount paid by the client in this transaction.
float $fees Merchant fees charged against this transaction.
float $amountOut Gross amount returned to the client via this transaction.
float $exchangeRate The exchange rate between the currency paid by the client and the currency of the WHMCS install.

Methods summary

Return Type Method Name Description
BelongsTo client() A transaction can belong to a client.
BelongsTo invoice() A transaction can belong to an invoice.

Details

BelongsTo client ()

A transaction can belong to a client.

Return Value

BelongsTo

BelongsTo invoice ()

A transaction can belong to an invoice.

Return Value

BelongsTo