Retrieve payments received from customers or sent to suppliers.
Payment — Returns a single payment by id
Payment — Returns a single payment by idquery GetPayment($id: ID!) {
Payment(id: $id) {
id
amount
paid_at
notes
payment_method { id label }
customer { id label }
invoice_payments {
id
amount
invoice { id label }
}
}
}Payments — Returns a paginated list of payments with sorting and filters
Payments — Returns a paginated list of payments with sorting and filtersquery Payments(
$where: QueryPaymentsWhereWhereConditions,
$orderBy: [QueryPaymentsOrderByOrderByClause!],
$search: String,
$first: Int,
$page: Int
) {
Payments(
where: $where,
orderBy: $orderBy,
search: $search,
first: $first,
page: $page
) {
paginatorInfo {
total
currentPage
}
data {
id
amount
paid_at
customer { id label }
}
}
}InvoicePayment — Returns a single invoice payment by id
InvoicePayment — Returns a single invoice payment by idquery GetInvoicePayment($id: ID!) {
InvoicePayment(id: $id) {
id
amount
invoice { id label }
invoice_payable {
... on Payment { id amount }
... on CreditNote { id total }
}
}
}InvoicePayments — Returns a paginated list of invoice payments with sorting and filters
InvoicePayments — Returns a paginated list of invoice payments with sorting and filtersquery InvoicePayments(
$where: QueryInvoicePaymentsWhereWhereConditions,
$orderBy: [QueryInvoicePaymentsOrderByOrderByClause!],
$first: Int,
$page: Int
) {
InvoicePayments(
where: $where,
orderBy: $orderBy,
first: $first,
page: $page
) {
paginatorInfo {
total
currentPage
}
data {
id
amount
invoice_id
invoice_payable_id
invoice_payable_type
}
}
}Available fields
Payment
Payment| Field | Type | Description |
|---|---|---|
id | Int | Unique identifier. |
amount | Float | Payment amount. |
paid_at | Date | Date of payment. |
notes | String | Public description or notes. |
created_at | DateTime | Creation time. |
updated_at | DateTime | Last update time. |
integrations | [Integration] | Linked external platforms. |
payment_method | PaymentMethod | Method used (e.g., Cash, Credit Card). |
customer | Customer | Associated customer. |
invoice_payments | [InvoicePayment] | Allocation of the payment to specific invoices. |
custom_fields | [EntityCustomField] | Custom fields for this entity. |
Data Types
InvoicePayment
InvoicePaymentRepresents the link between a Payment (or Credit Note) and an Invoice.
| Field | Type | Description |
|---|---|---|
id | ID | Link ID. |
amount | Float | Amount allocated to the invoice. |
invoice_id | Int | Linked invoice ID. |
invoice_payable_id | Int | ID of the source Payment or Credit Note. |
invoice_payable_type | String | Type of the source document (Payment or CreditNote). |
created_at | DateTime | Link creation time. |
invoice | Invoice | Target invoice. |
invoice_payable | InvoicePayable | Union type: Payment or CreditNote. Use inline fragments (... on Payment { ... }) to query fields. |
Filters
The following fields can be used in the where parameter:
id, amount, paid_at, notes, payment_method_id, invoice_id, customer_id, customer_tag_id, created_at, updated_at.
Example Filters:
| Field | Example |
|---|---|
id | { "column": "ID", "operator": "EQ", "value": 200050 } |
amount | { "column": "AMOUNT", "operator": "GT", "value": 100.0 } |
paid_at | { "column": "PAID_AT", "operator": "GTE", "value": "2025-01-01" } |
customer_id | { "column": "CUSTOMER_ID", "operator": "EQ", "value": 100001 } |
invoice_id | { "column": "INVOICE_ID", "operator": "EXISTS", "value": 200001 } |
InvoicePayments Filters
InvoicePayments FiltersThe following fields can be used in the where parameter for InvoicePayments:
amount, invoice_id, invoice_payable_id, invoice_payable_type.
Example Filters:
| Field | Example |
|---|---|
invoice_id | { "column": "INVOICE_ID", "operator": "EQ", "value": 200001 } |
invoice_payable_type | { "column": "INVOICE_PAYABLE_TYPE", "operator": "EQ", "value": "Payment" } |
Sorting
You can sort results using the orderBy parameter:
idamountpaid_atnotespayment_method_idpayment_method_labelcustomer_labelcreated_atupdated_at
InvoicePayments Sorting
InvoicePayments SortingYou can sort results using the orderBy parameter:
amountinvoice_idinvoice_payable_idinvoice_payable_type
