Skip to main content

payment

Requires at least one of the permissions payments:payment:read or purchase:payment:read.

Returns one payment by ID. A user restricted to their own customers cannot open a payment outside that book. A collection needs the payments read permission; a supplier payment needs the supplier payments read permission.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

query Payment($id: ID!) {
payment(id: $id) {
id
checkNumber
currencyCode
paymentNumber
referenceNumber
status
allocations {
id
invoiceNumber
paymentNumber
createdAt
amount
appliedFromAdvance
}
}
}

Variables:

{
"id": "id"
}

Response:

{
"data": {
"payment": {
"id": "id",
"checkNumber": "string",
"currencyCode": "string",
"paymentNumber": "string",
"referenceNumber": "string",
"status": "APPROVED",
"allocations": [
{
"id": "id",
"invoiceNumber": "string",
"paymentNumber": "string",
"createdAt": "2025-01-15T00:00:00Z",
"amount": 0,
"appliedFromAdvance": true
}
]
}
}
}
payment(
id: ID!
): Payment!

Arguments​

payment.id ● ID! non-null scalar​

The ID of the payment.

Type​

Payment object​

A payment made out to a vendor or a collection received from a customer, with its allocations to invoices.