Skip to main content

reversePaymentAllocations

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

Reverses selected allocations of a payment: each affected invoice's paid amount goes back down and it owes the money again. The original allocation is kept and a negative counter-entry records the reversal. At least one allocation ID is required.

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 ReversePaymentAllocations($input: ReversePaymentAllocationsInput!) {
reversePaymentAllocations(input: $input) {
id
checkNumber
currencyCode
paymentNumber
referenceNumber
status
allocations {
id
invoiceNumber
paymentNumber
createdAt
amount
appliedFromAdvance
}
}
}

Variables:

{
"input": {
"allocationIds": [
"id"
],
"paymentId": "id"
}
}

Response:

{
"data": {
"reversePaymentAllocations": {
"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
}
]
}
}
}
reversePaymentAllocations(
input: ReversePaymentAllocationsInput!
): Payment!

Arguments​

reversePaymentAllocations.input ● ReversePaymentAllocationsInput! non-null input​

The payment and the allocations to reverse.

Type​

Payment object​

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