Payment
extends DataTransferObject
in package
implements
DataModel
Payments are a record of the payments made on invoices.
Tags
Table of Contents
Interfaces
Constants
- RESPONSE_FIELD = 'payment'
Properties
- $accountingSystemId : string
- $amount : Money
- $bulkPaymentId : int|null
- $clientId : int
- $creditId : int
- $date : DateTime
- $fromCredit : bool
- $gateway : string
- $id : int
- $invoiceId : int
- $note : string
- $orderId : int|null
- $overpaymentId : int
- $paymentId : int
- $sendClientNotification : bool
- $type : string
- $updated : DateTimeImmutable
- $visState : int
Methods
- getContent() : array<string|int, mixed>
- Get the data as an array to POST or PUT to FreshBooks, removing any read-only fields.
Constants
RESPONSE_FIELD
public
mixed
RESPONSE_FIELD
= 'payment'
Properties
$accountingSystemId
public
string
$accountingSystemId
Unique identifier of account the payment exists on.
$amount
public
Money
$amount
The amount of the payment.
Money object containing amount and currency code.
$bulkPaymentId
public
int|null
$bulkPaymentId
$clientId
public
int
$clientId
Id of client who made the payment.
$creditId
public
int
$creditId
The id of a related credit resource.
$date
public
DateTime
$date
Date the payment was made.
The API returns this in YYYY-MM-DD format. It is converted to a DateTime.
$fromCredit
public
bool
$fromCredit
If the payment was converted from a Credit on a Client's account.
$gateway
public
string
$gateway
The payment processor (gateway) used to make the payment, if any.
Eg. "stripe"
$id
public
int
$id
The unique id (across this business) for the payment.
$invoiceId
public
int
$invoiceId
The id of a related Invoice resource.
$note
public
string
$note
Notes on payment, often used for credit card reference number.
Do not store actual credit card numbers here.
$orderId
public
int|null
$orderId
$overpaymentId
public
int
$overpaymentId
Id of related overpayment Credit if relevant.
$paymentId
public
int
$paymentId
Duplicate of id.
Note: The API returns this as logid
.
$sendClientNotification
public
bool
$sendClientNotification
Whether to send the client a notification of this payment.
$type
public
string
$type
Type of payment made.
Eg. “Check”, “Credit”, “Cash”
$updated
public
DateTimeImmutable
$updated
The time of last modification.
Note: The API returns this data in "US/Eastern", but it is converted here to UTC.
$visState
public
int
$visState
The visibility state: active, deleted, or archived
Methods
getContent()
Get the data as an array to POST or PUT to FreshBooks, removing any read-only fields.
public
getContent() : array<string|int, mixed>