The payment objects describe invoices, credit notes, overpayments, charges and credit allocations. They might contain information about any external links the invoice has.
You can retrieve individual invoices, credit notes and overpayments as well as query all the items.
You can find a list of all possible invoice, credit note and overpayment statuses here.
Here is the list of all properties the payment object has:
Payment
Property
Type
Required
Description
number
string
true
The document number for the invoice, credit memo or overpayment.
documentType
enum
false
The type of the document. It could be either invoice , creditNote or overpayment.
The total of the invoice / credit note before tax.
amount
number
readonly
The total of the invoice / credit note after tax and discount.
payableAmount
number
readonly
Total amount due for this invoice. Voided and paid invoices has payableAmount of 0.
createdAt
date
readonly
The date when the payment has been created at.
createdBy
id
readonly
The user that created the payment.
modifiedAt
date
readonly
The date when the payment has been modified for the last time. Before the first modification, this field equals to the createdAt field. Note that adding/removing charges and credit allocations are considered modifications to both the invoice and the credit note/overpayment.
modifiedBy
id
readonly
The user that did the last modification to the payment. Before the first modification, this field equals to the createdBy field.
Data on the payment sync with an accounting integration.
Credit Allocation
Property
Type
Required
Description
target
id
true
If payment is an invoice, a reference to the credit note, sourcing the credit. If payment is a credit note, a reference to the invoice the credit is allocated to.
amount
number
true
The allocated amount.
Line Item
Property
Type
Required
Description
description
string
true
Description of the line item.
account
id
true
A reference to the account the line item is allocated to.
vatPercent
number
true
The tax percent applied to the line item.
vatAmount
number
true
The tax amount applied to the line item.
quantity
number
true
The quantity of items described by the line item.
unitPrice
number
true
The unit price as described in the system.
discountAmount
number
true
The calculated discount amount based on the discount set in the invoice.
baseUnitPrice
number
true
The calculated unit price without tax.
baseTotal
number
true
The total without tax.
total
number
true
The total for the line item (including tax).
Vat Amount
Property
Type
Required
Description
percent
number
true
The tax percent for the group.
total
number
true
The tax total for the group.
taxRate
id
true
A reference to the taxRate the group is for.
Accounting Integration
Property
Type
Required
Description
provider
string
true
The name of the accounting provider.
providerId
string
false
The id of the payment in the accounting provider.
externalOrgId
string
true
The organization id in the accounting provider.
deepLink
string
false
A deep link to the payment in the accounting provider.
lastSync
date
false
The date of the last sync of the payment with the accounting integration.
error
string
false
An error message with more details about the reason of the failure.