---
title: "SQL-018: clsPaymentDetail insert"
summary: Inserts an individual EFT payment line item into PAYMENT_DETAIL.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business.Payment.EFT
reference_type: package
---

# SQL-018: clsPaymentDetail insert

Inserts an individual EFT payment line item into PAYMENT_DETAIL.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-018 |
| **Operation type** | Create |
| **Execution method** | Inline SQL |
| **Database** | Oracle* |
| **Schema** | [unqualified]** |
| **Command type** | Text |
| **Business object** | `clsPaymentDetail` |
| **Criteria property** | `InsertSQL` |
| **Lifecycle method** | `BeforeInsert / AfterInsert` |


## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| :ConfirmationCheckNum | Input | String | 25 | Binds `ConfirmationCheckNum`* |
| :CreditDebitCode | Input | String | 5 | Binds `CreditDebitCode`* |
| :CurrentPaymentEventCode | Input | String | 5 | Binds `CurrentPaymentEventCode`* |
| :NsfCount | Input | Decimal | — | Binds `NsfCount`* |
| :OnlinePaymentTypeCode | Input | String | 5 | Binds `OnlinePaymentTypeCode`* |
| :PaymentAmt | Input | Decimal | — | Binds `PaymentAmt`* |
| :PaymentAuthorizationSeqNum | Input | Decimal | — | Binds `PaymentAuthorizationSeqNum`* |
| :PaymentDate | Input | Date | — | Binds `PaymentDate`* |
| :PaymentDetailSeqNum | Input | Decimal | — | Binds `PaymentDetailSeqNum` |
| :PrenoteFlag | Input | String | 1 | Binds `PrenoteFlag`* |
| :AchStdEntryClassCode | Input | String | 5 | Binds `AchStdEntryClassCode`* |
| :AchAddendumText | Input | String | 80 | Binds `m_AchAddendumText`* |
| :PaymentVendorXMLText | Input | String | 4000 | Binds `m_PaymentVendorXMLText`* |
| :ResubmitDate | Input | Date | — | Binds `m_ResubmitDate`* |
| :UpdateDate | Input | Date | — | Binds `m_UpdateDate`* |
| :UpdateUser | Input | String | 30 | Binds `m_UpdateUser`* |
| :CreateDate | Input | Date | — | Binds `CreateDate`* |
| :CreateUser | Input | String | 30 | Binds `CreateUser`* |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [PAYMENT_DETAIL](../database-tables.md#payment_detail) | — | — |

## Sample SQL

```sql
Insert into PAYMENT_DETAIL (
  ACH_STD_ENTRY_CLASS_CODE, ACH_ADDENDUM_TEXT, CONFIRMATION_CHECK_NUM,
  CREATE_DATE, CREATE_USER, CREDIT_DEBIT_CODE, CURRENT_PAYMENT_EVENT_CODE,
  NSF_COUNT, ONLINE_PAYMENT_TYPE_CODE, PAYMENT_AMT, PAYMENT_AUTHORIZATION_SEQ_NUM,
  PAYMENT_DATE, PAYMENT_DETAIL_SEQ_NUM, PAYMENT_VENDOR_XML_TEXT, PRENOTE_FLAG,
  RESUBMIT_DATE, UPDATE_DATE, UPDATE_USER
)
Values (
  :AchStdEntryClassCode, :AchAddendumText, :ConfirmationCheckNum,
  :CreateDate, :CreateUser, :CreditDebitCode, :CurrentPaymentEventCode,
  :NsfCount, :OnlinePaymentTypeCode, :PaymentAmt, :PaymentAuthorizationSeqNum,
  :PaymentDate, :PaymentDetailSeqNum, :PaymentVendorXMLText, :PrenoteFlag,
  :ResubmitDate, :UpdateDate, :UpdateUser
)
```

## Operations and processes
- [Payment detail and allocation](../operations/payment-detail-and-allocation.md)*

> **Note:** Statements marked with `*` were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with `**` could not be confirmed; treat as unknown until verified.

## Business rules
- [BR-EFT-05: Insert/update operations require exactly one affected row](../business-rules.md#br-eft-05-insertupdate-operations-require-exactly-one-affected-row)*

## Sources
- `Business\SAIF.Business.Payment.EFT\clsPaymentDetail.vb`
