---
id: object/codeunit/980
type: object
title: Codeunit 980 "Payment Registration Mgt."
summary: Codeunit 980 "Payment Registration Mgt." in Base Application (Microsoft.Bank.Payment). 14 public procedures, 9 events, 1 event subscribers. Present since at least BC23, still in BC30, changed in BC25.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "25"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: b1254d30c4f96e2dde71199e65a9425dd7067bcd7fc45d56516cf5e82acd3872
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Bank/Payment/PaymentRegistrationMgt.Codeunit.al
    title: src/Layers/W1/BaseApp/Bank/Payment/PaymentRegistrationMgt.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 980
name: Payment Registration Mgt.
namespace: Microsoft.Bank.Payment
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "25"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 38
  events: 9
  subscribers: 1
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 2
  calls: 19
  called_by: 4
  implements: 0
---

# Codeunit 980 "Payment Registration Mgt."

> Codeunit 980 "Payment Registration Mgt." in Base Application (Microsoft.Bank.Payment). 14 public procedures, 9 events, 1 event subscribers. Present since at least BC23, still in BC30, changed in BC25.

Base Application · Microsoft.Bank.Payment · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Bank/Payment/PaymentRegistrationMgt.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| TableNo | Payment Registration Buffer |

## Events published

- `OnAfterPostPaymentRegistration(var TempPaymentRegistrationBuffer: Record "Payment Registration Buffer" temporary)` (integration): Integration event raised after payment registration entries have been posted. This event allows external extensions to perform additional processing after payments are posted.
- `OnAfterFindRecords(var TempDocumentSearchResult: Record "Document Search Result" temporary; DocNoFilter: Code[20]; AmountFilter: Decimal; AmountTolerancePerc: Decimal)` (integration)
  - subscribers: [Codeunit 6469 "Serv. Payment Registration"](../codeunit/6469.md) OnAfterFindRecords
- `OnBeforeGenJnlLineInsert(var GenJournalLine: Record "Gen. Journal Line"; TempPaymentRegistrationBuffer: Record "Payment Registration Buffer" temporary)` (integration)
- `OnCalculateBalanceOnAfterSetPostedBalance(var PostedBalance: Decimal; GLAccount: Record "G/L Account"; BankAccount: Record "Bank Account")` (integration)
- `OnBeforePost(var TempPaymentRegistrationBuffer: Record "Payment Registration Buffer" temporary)` (integration): Integration event raised before posting payment registration entries. This event allows external extensions to validate or modify payment data before posting.
- `OnFindSalesHeaderRecordsOnBeforeToleranceCheck(var SalesHeader: Record "Sales Header")` (integration)
- `OnShowSalesHeaderRecordsOnBeforeOpenPage(var TempDocumentSearchResult: Record "Document Search Result" temporary; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)` (integration)
- `OnShowRecords(var TempDocumentSearchResult: Record "Document Search Result" temporary)` (integration)
  - subscribers: [Codeunit 6469 "Serv. Payment Registration"](../codeunit/6469.md) OnShowRecords
- `OnUpdateApplicationFieldsOnCustLedgerEntryOnAfterCalcRemainingAmount(var CustLedgerEntry: Record "Cust. Ledger Entry")` (integration)

## Event subscriptions

- OnRunPreview subscribes to Codeunit "Gen. Jnl.-Post Preview" OnRunPreview

## Procedures

- `RunSetup()`: Runs the payment registration setup wizard to configure payment registration defaults. This procedure checks if setup is complete and guides users through configuration if needed.
- `Post(var TempPaymentRegistrationBuffer: Record "Payment Registration Buffer" temporary; LumpPayment: Boolean)`: Posts payment registration entries to the general ledger. This procedure creates and posts general journal entries based on payment registration buffer data.
- `ConfirmClose(var PaymentRegistrationBuffer: Record "Payment Registration Buffer"): Boolean`: Confirms whether to close the payment registration page when there are unsaved payments. This procedure checks for pending payments and prompts the user for confirmation before closing.
- `ConfirmPost(var PaymentRegistrationBuffer: Record "Payment Registration Buffer")`: Confirms and posts payment registrations after validation. This procedure validates payment entries and posts them after user confirmation.
- `FindRecords(var TempDocumentSearchResult: Record "Document Search Result" temporary; DocNoFilter: Code[20]; AmountFilter: Decimal; AmountTolerancePerc: Decimal)`: Finds document records that match the specified search criteria. This procedure searches for sales documents, reminders, and finance charge memos based on document number and amount filters.
- `ShowRecords(var TempDocumentSearchResult: Record "Document Search Result" temporary)`: Shows the detailed records for a selected document search result. This procedure opens the appropriate page to display the full document details based on the search result type.
- `ConfirmPostLumpPayment(var SourcePaymentRegistrationBuffer: Record "Payment Registration Buffer")`
- `InsertDocSearchResult(var TempDocumentSearchResult: Record "Document Search Result" temporary; DocNo: Code[20]; DocType: Integer; TableID: Integer; DocTypeDescription: Text[50]; Amount: Decimal)`: Inserts a document search result record into the temporary search result table. This procedure creates a new search result entry for documents found during payment registration searches.
- `SetToleranceLimits(Amount: Decimal; AmountTolerance: Decimal; ToleranceTxt: Text): Text`: Sets tolerance limits for amount matching and returns formatted tolerance information. This procedure calculates and displays tolerance ranges for payment amount matching.
- `IsWithinTolerance(Amount: Decimal; FilterAmount: Decimal; TolerancePct: Decimal): Boolean`: Determines whether an amount is within the specified tolerance range of a filter amount. This procedure is used for amount matching during document searches and payment registration.
- `CalculateBalance(var PostedBalance: Decimal; var UnpostedBalance: Decimal)`
- `OpenGenJnl()`
- `Preview(var PaymentRegistrationBuffer: Record "Payment Registration Buffer"; AsLump: Boolean)`
- `SetPreviewContext(AsLump: Boolean)`

Plus 14 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 981 "Payment Registration Buffer"](../table/981.md)

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 103 "Cust. Entry-Edit"](../codeunit/103.md) (3 calls: `ClearApplicationFieldsOnCustLedgerEntry → (object)`, `UpdateApplicationFieldsOnCustLedgerEntry → (object)`, `UpdatePmtDiscountDateOnCustLedgerEntry → (object)`)
- [Codeunit 13 "Gen. Jnl.-Post Batch"](../codeunit/13.md) (2 calls: `Post → (object)`, `Post → Preview`)
- [Codeunit 426 "Payment Tolerance Management"](../codeunit/426.md) (2 calls: `Post → PmtTolGenJnl`, `Post → SetSuppressCommit`)
- [Codeunit 19 "Gen. Jnl.-Post Preview"](../codeunit/19.md) (1 call: `Preview → Preview`)
- [Codeunit 308 "No. Series - Batch"](../codeunit/308.md) (1 call: `Post → GetNextNo`)
- [Codeunit 9070 "Document Errors Mgt."](../codeunit/9070.md) (1 call: `CheckPaymentsToPost → GetNothingToPostErrorMsg`)
- [Codeunit 9500 "Sequence No. Mgt."](../codeunit/9500.md) (1 call: `OnRun → SetPreviewMode`)
- [Page 39 "General Journal"](../page/39.md) (1 call: `OpenGenJnl → (object)`)
- [Page 41 "Sales Quote"](../page/41.md) (1 call: `ShowSalesHeaderRecords → (object)`)
- [Page 42 "Sales Order"](../page/42.md) (1 call: `ShowSalesHeaderRecords → (object)`)
- [Page 43 "Sales Invoice"](../page/43.md) (1 call: `ShowSalesHeaderRecords → (object)`)
- [Page 434 "Reminder"](../page/434.md) (1 call: `ShowRecords → (object)`)
- [Page 44 "Sales Credit Memo"](../page/44.md) (1 call: `ShowSalesHeaderRecords → (object)`)
- [Page 446 "Finance Charge Memo"](../page/446.md) (1 call: `ShowRecords → (object)`)
- [Page 456 "No. Series"](../page/456.md) (1 call: `UpdateApplicationFieldsOnCustLedgerEntry → (object)`)
- [Page 507 "Blanket Sales Order"](../page/507.md) (1 call: `ShowSalesHeaderRecords → (object)`)
- [Page 6630 "Sales Return Order"](../page/6630.md) (1 call: `ShowSalesHeaderRecords → (object)`)
- [Page 980 "Balancing Account Setup"](../page/980.md) (1 call: `RunSetup → (object)`)
- [Page 982 "Payment Registration Setup"](../page/982.md) (1 call: `RunSetup → (object)`)

## Called by

- [Page 981 "Payment Registration"](../page/981.md) (3 calls: `OnFindRecord → CalculateBalance`, `OnOpenPage → RunSetup`, `OnQueryClosePage → ConfirmClose`)
- [Codeunit 6469 "Serv. Payment Registration"](../codeunit/6469.md) (2 calls: `OnAfterFindRecords → InsertDocSearchResult`, `OnAfterFindRecords → IsWithinTolerance`)
- [Codeunit 1070 "MS - PayPal Standard Mgt."](../codeunit/1070.md) (1 call: `RunPaymentRegistrationSetupForce → RunSetup`)
- [Codeunit 1073 "MS - PayPal Webhook Management"](../codeunit/1073.md) (1 call: `PostPaymentForInvoice → Post`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC25

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Payment Registration Mgt.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
