Skip to main content

confirmPayment

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

Commits a DRAFT payment. A draft posts nothing and is excluded from the allocation pool; confirming it posts the partner balance once and sets the status from allocation coverage: none PENDING, part PARTIAL, all PAID. Confirming a payment that is already committed returns it unchanged, so a double click cannot post twice. Cancelled, reversed and refunded payments are refused.

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

Variables:

{
"input": {
"paymentId": "id"
}
}

Response:

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

Arguments​

confirmPayment.input ● ConfirmPaymentInput! non-null input​

The draft payment to confirm.

Type​

Payment object​

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