Skip to main content

Payment Batch

How to build Custom XBerts on the Payment Batch data area to validate accounts payable batch payment runs, reconcile header totals against line amounts, and check source and destination accounts.

Written by Marsha Galicia

The Payment Batch represents a single accounts payable batch payment - a run that pays several supplier bills at once from one source bank account. Only spend (AP) batches are included, and only batches that have at least one payee line. Each batch carries its header total, the bank account it was paid from, the batch date, status and reconciled flag, and free-text header particulars, with a nested line for each payee showing the bill it pays, the per-payee particulars, the amount, and the destination account the money was sent to.

Use this data area to validate a payment run before or after it is processed: reconcile the header total against the sum of the line amounts, confirm the run was drawn from the expected in-scope account, check that the right reference appears on each line, flag negative or zero lines, spot a payee appearing more than once, or detect a destination account that does not match the supplier. For a complete batch the header total equals the sum of the line amounts; a difference indicates a missing or extra line. Status is not always populated, so the reconciled flag and batch date are the most reliable way to tell live runs from historic ones.


The AI will only look back at 24 months' worth of data.

Key Properties:

  1. SourceLink: The stable unique key for the batch, used to identify each batch payment.

  2. Type: The batch type. Always 'PAYBATCH' for this area, as receive (accounts receivable) batches are excluded, so you do not need to filter on it.

  3. BatchDate: The date the batch payment is dated. This is the date used for time-based questions such as "last month" or "this quarter". May be empty.

  4. Reference: The free-text reference or label entered on the batch header (one of two header particulars surfaces). May be empty.

  5. Details: The free-text details or narrative entered on the batch header (the second header particulars surface). May be empty.

  6. SourceAccountName: The display name of the bank account the batch was paid from (the source or funding account). Use this to check the run was drawn from the expected in-scope account. Empty when the account could not be resolved.

  7. SourceAccountUid: The identifier of the source bank account behind SourceAccountName. Use SourceAccountName for display.

  8. Currency: The currency code of the batch, taken from the source bank account. The TotalAmount and each line Amount are in this currency.

  9. TotalAmount: The batch header total, in the batch currency. For a complete batch this equals the sum of the line amounts - compare the two to detect a batch whose header total does not match its lines.

  10. LineItemCount: The number of payee lines in the batch (equal to the count of LineItems). Useful for batch-completeness or expected-line-count checks.

  11. IsReconciled: True when the batch has been reconciled against the bank statement. Prefer this over Status for detecting live or complete batches, because Status is not always populated.

  12. Status: The batch lifecycle status from the source ledger, for example 'AUTHORISED' or 'DELETED'. Not always populated, so do not rely on it alone - use IsReconciled or BatchDate instead. When it is present, treat 'DELETED' as not actionable.

  13. LineItems: The per-payee lines that make up the batch. Sum their amounts and compare to TotalAmount for reconciliation, or count them for batch completeness.

    • PaymentBatchLine

      • InvoiceBillUid: The bill this line pays. Use it to tie a payee line back to a specific bill; there is no nested bill object.

      • Reference: The per-payee lodgement reference (the particulars the bank shows for this line). Free text; may be empty.

      • Details: The per-payee lodgement details or narrative. Free text; may be empty.

      • Amount: The amount paid to this payee on this line, in the batch currency. Sum these across all lines and compare to TotalAmount for reconciliation.

      • SuppliersBankAccountNumber: The destination bank account the money was sent to for this payee, as printed on the line. May be empty when the ledger does not capture it. When present, compare it against the supplier's saved bank account to detect payment redirection.

📝 Example Alerts

Alert me when a batch payment's total does not equal the sum of its line amounts.
Alert me when a batch payment has a line with a negative or zero amount.
Alert me when a batch payment is drawn from a bank account other than the main business cheque account.
Alert me when a payee appears more than once in the same batch payment.
Alert me when a batch payment line is missing its payment reference.
Did this answer your question?