processPayment
Requires at least one of the permissions payments:payment:update or purchase:payment:update.
Marks a payment as PROCESSED. When the payment has a bank account, that account's balance moves in the same step: down for a payment to a supplier and up for a collection. A payment that is already processed is 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:
- GraphQL
- cURL
mutation ProcessPayment($paymentId: ID!) {
processPayment(paymentId: $paymentId) {
id
checkNumber
currencyCode
paymentNumber
referenceNumber
status
allocations {
id
invoiceNumber
paymentNumber
createdAt
amount
appliedFromAdvance
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation ProcessPayment($paymentId: ID!) {\n processPayment(paymentId: $paymentId) {\n id\n checkNumber\n currencyCode\n paymentNumber\n referenceNumber\n status\n allocations {\n id\n invoiceNumber\n paymentNumber\n createdAt\n amount\n appliedFromAdvance\n }\n }\n}",
"variables": {
"paymentId": "id"
}
}
EOF
Variables:
{
"paymentId": "id"
}
Response:
{
"data": {
"processPayment": {
"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
}
]
}
}
}
processPayment(
paymentId: ID!
): Payment!
Arguments
processPayment.paymentId ● ID! non-null scalar
The ID of the payment to process.
Type
Payment object
A payment made out to a vendor or a collection received from a customer, with its allocations to invoices.