Skip to main content

updatePayment

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

Changes a recorded payment. The status follows how much is allocated: nothing allocated is PENDING, part allocated is PARTIAL and fully allocated is PAID. Refused when the payment does not exist in your organization.

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:

mutation UpdatePayment($id: ID!, $input: UpdatePaymentInput!) {
updatePayment(id: $id, input: $input) {
id
checkNumber
currencyCode
paymentNumber
referenceNumber
status
allocations {
id
invoiceNumber
paymentNumber
createdAt
amount
appliedFromAdvance
}
}
}

Variables:

{
"id": "id",
"input": {}
}

Response:

{
"data": {
"updatePayment": {
"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
}
]
}
}
}
updatePayment(
id: ID!
input: UpdatePaymentInput!
): Payment!

Arguments​

updatePayment.id ● ID! non-null scalar​

The ID of the payment.

updatePayment.input ● UpdatePaymentInput! non-null input​

The payment changes.

Type​

Payment object​

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