Payments
Represents payments that are received from customers, including amount, date, payment method, and linked invoices, forming the basis for accounts-receivable settlement.
Table Specific Information
Payments may be inserted, queried, or updated via the Payments or PaymentLineItems tables. Payments may be deleted by using the Payments table.
Select
All filterable columns support the following operators:
- =
- !=
- >=
- <=
- >
- <
- IN
- LIKE
- CONTAINS
The driver processes other filters client-side within the driver.
Insert
To add a Payment, specify a Customer and at least one item Line Item. The LineAggregate column may be used to specify an XML aggregate of Line Item data. Each _ denotes hierarchy. Use <Line> at the base level. The contents of LineAggregate will be sent to the API as is. All values for each field in the aggregate should adhere to the API's specifications (e.g. for dates in format yyyy-MM-dd, for date times in format yyyy-MM-dd'T'HH:mm:sszzz). The columns that may be used in the aggregates begin with the prefix 'Line_' to indicate they are part of the line item. Use the Line_ column along with the DocNumber to indicate which lines go with which Payments. For example
INSERT INTO Payments (CustomerRef, TotalAmt, LineAggregate)
VALUES ('4', '0.03', '
<Line><Amount>0.01</Amount><LinkedTxn><TxnId>116</TxnId><TxnType>Invoice</TxnType></LinkedTxn></Line>
<Line><Amount>0.02</Amount><LinkedTxn><TxnId>117</TxnId><TxnType>Invoice</TxnType></LinkedTxn></Line>
')
To automatically add payments for invoices up to a specific total amount, set AutoInvoice to true. You must also supply a Customer and a positive TotalAmt. Your unpaid invoices will be paid from the soonest due to the oldest one.
INSERT INTO Payments (CustomerRef, TotalAmt, AutoInvoice) VALUES ('4', 27.5, true)
Columns
| Name | Type | ReadOnly | References | Filterable | Sortable | Description |
| Id [KEY] | String | True | True | True |
Specifies the unique identifier (Id) of the payment that is stored in QuickBooks Online. | |
| SyncToken | String | True | False | False |
Specifies the version number of the payment object that is used to lock the object for use by one application at a time. When an application modifies an object, its sync token is incremented. Attempts to modify an object specifying an older sync token fail. Only the latest version of the object is maintained by QuickBooks Online. | |
| MetaData_CreateTime | Datetime | True | True | True |
Specifies the date and time when the payment record was created in QuickBooks Online. | |
| MetaData_LastUpdatedTime | Datetime | True | True | True |
Specifies the date and time when the payment record was last updated in QuickBooks Online. | |
| TxnDate | Date | False | True | False |
Specifies the date when this payment transaction occurred as entered by the user. | |
| PrivateNote | String | False | False | False |
Specifies a private note about the payment transaction. This note does not appear on the transaction records by default. | |
| LineAggregate | String | False | False | False |
Specifies an XML aggregate of the payment line items that are included in this payment transaction. Each line item represents a detailed component of the overall payment, such as amounts applied to invoices or other receivables. For example, a payment might include a line applied to Invoice 12345 for 100.00 USD and another line applied to Invoice 12346 for 50.00 USD. | |
| CustomerRef | String | False |
Customers.Id | True | False |
Specifies the unique identifier of the customer that is linked to this payment. |
| CustomerRef_Name | String | True |
Customers.DisplayName | False | False |
Specifies the name of the customer that is linked to this payment. |
| DepositToAccountRef | String | False |
Accounts.Id | False | False |
Specifies the unique Id of the asset account that designates the account where the payment money needs to be deposited. This field is optional and overrides the default Undeposited Funds account if provided. |
| DepositToAccountRef_Name | String | True |
Accounts.Name | False | False |
Specifies the name of the asset account where the payment money needs to be deposited. This field is optional and overrides the default Undeposited Funds account if provided. |
| PaymentMethodRef | String | False | False | False |
Specifies the unique Id of the payment method that is used for this payment. | |
| PaymentMethodRef_Name | String | True |
PaymentMethods.Name | False | False |
Specifies the name of the payment method that is used for this payment. The allowed values are Cash, Check, CreditCard, Other. |
| PaymentRefNum | String | False | True | True |
Specifies the reference number that is assigned to the payment received, such as a check number or transaction Id. | |
| CreditCardPayment_CreditChargeInfo | String | False | False | False |
Specifies credit-card information that is used to request a credit card payment from a merchant account service but does not include any response or authorization information returned from the merchant-account service provider. | |
| CreditCardPayment_NameOnAcct | String | False | False | False |
Specifies the name of the account holder as printed on the credit card. | |
| CreditCardPayment_CcExpiryMonth | Integer | False | False | False |
Specifies the expiration month printed on the credit card. | |
| CreditCardPayment_CcExpiryYear | Integer | False | False | False |
Specifies the four-digit expiration year printed on the credit card. | |
| CreditCardPayment_BillAddrStreet | String | False | False | False |
Specifies the street portion of the billing address for the credit card account holder. | |
| CreditCardPayment_PostalCode | String | False | False | False |
Specifies the postal code portion of the billing address for the credit card account holder. | |
| TotalAmt | Decimal | False | True | True |
Specifies the total monetary amount of the payment transaction. This value includes the sum of all payments from the payment details. | |
| UnappliedAmt | Decimal | False | False | False |
Specifies the monetary amount from the payment that has not yet been applied to pay amounts owed for sales transactions. | |
| ProcessPayment | Boolean | False | False | False |
Specifies whether the payment should be processed by the merchant account service. This field is valid for QuickBooks Online companies that have credit-card processing enabled. | |
| CurrencyRef | String | False | False | False |
Specifies the unique Id of the currency that is used in this payment transaction. | |
| CurrencyRef_Name | String | True | False | False |
Specifies the name of the currency that is used in this payment transaction. | |
| ExchangeRate | Decimal | False | False | False |
Specifies the currency exchange rate that is applied to this payment. This field is valid only when the company file is set up to use the multicurrency feature. In QuickBooks, exchange rates are always recorded as the number of home currency units it takes to equal one foreign currency unit. This field is available for the UK, AU, and CA editions. | |
| TransactionLocationType | String | False | False | False |
Specifies the account location for the payment. This field is valid only in the FR editions. The allowed values are WithinFrance, FranceOverseas, OutsideFranceWithEU, OutsideEU. | |
| ProjectRef | String | False | True | False |
Specifies the unique Id of the project that is linked to this payment transaction. | |
| TaxExemptionRef | String | True | False | False |
Specifies the tax exemption Id for the customer that is linked to this payment. This Id is typically issued by the state. | |
| TxnSource | String | True | False | False |
Specifies the originating source of a credit-card transaction for internal use by QuickBooks Online. |
Pseudo-Columns
Pseudo Column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
| Name | Type | Description |
| AutoInvoice | Boolean |
Specifies whether payments are automatically applied to invoices, starting from the oldest invoice to the newest. |