A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pkg.go.dev/github.com/moov-io/ach below:

ach package - github.com/moov-io/ach - Go Packages

type ADVBatchControl struct {
	
	ID string `json:"id"`
	
	ServiceClassCode int `json:"serviceClassCode"`
	
	
	EntryAddendaCount int `json:"entryAddendaCount"`
	
	
	
	
	
	
	EntryHash int `json:"entryHash"`
	
	TotalDebitEntryDollarAmount int `json:"totalDebit"`
	
	TotalCreditEntryDollarAmount int `json:"totalCredit"`
	
	ACHOperatorData string `json:"achOperatorData"`
	
	ODFIIdentification string `json:"ODFIIdentification"`
	
	
	
	
	BatchNumber int `json:"batchNumber"`
	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

ADVBatchControl contains entry counts, dollar total and has totals for all entries contained in the preceding batch

NewADVBatchControl returns a new ADVBatchControl with default values for none exported fields

ACHOperatorDataField get the ACHOperatorData right padded

BatchNumberField gets a string of the batch number zero padded

func (v *ADVBatchControl) CalculateCheckDigit(routingNumber string) int

EntryAddendaCountField gets a string of the addenda count zero padded

EntryHashField get a zero padded EntryHash

ODFIIdentificationField get the odfi number zero padded

Parse takes the input record string and parses the EntryDetail values

String writes the ADVBatchControl struct to a 94 character string.

TotalCreditEntryDollarAmountField get a zero padded Credit Entry Amount

TotalDebitEntryDollarAmountField get a zero padded Debit Entry Amount

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

type ADVEntryDetail struct {
	
	ID string `json:"id"`
	
	
	
	
	
	
	
	
	
	TransactionCode int `json:"transactionCode"`
	
	
	RDFIIdentification string `json:"RDFIIdentification"`
	
	CheckDigit string `json:"checkDigit"`
	
	
	DFIAccountNumber string `json:"DFIAccountNumber"`
	
	Amount int `json:"amount"`
	
	AdviceRoutingNumber string `json:"adviceRoutingNumber"`
	
	FileIdentification string `json:"fileIdentification,omitempty"`
	
	ACHOperatorData string `json:"achOperatorData,omitempty"`
	
	IndividualName string `json:"individualName"`
	
	
	
	
	
	
	DiscretionaryData string `json:"discretionaryData,omitempty"`
	
	
	
	AddendaRecordIndicator int `json:"addendaRecordIndicator,omitempty"`
	
	ACHOperatorRoutingNumber string `json:"achOperatorRoutingNumber"`
	
	JulianDay int `json:"julianDay"`
	
	SequenceNumber int `json:"sequenceNumber"`
	
	Addenda99 *Addenda99 `json:"addenda99,omitempty"`
	
	Category string `json:"category,omitempty"`
	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

ADVEntryDetail contains the actual transaction data for an individual entry. Fields include those designating the entry as a deposit (credit) or withdrawal (debit), the transit routing number for the entry recipient's financial institution, the account number (left justify,no zero fill), name, and dollar amount.

NewADVEntryDetail returns a new ADVEntryDetail with default values for non exported fields

ACHOperatorDataField returns a space padded string of ACHOperatorData

ACHOperatorRoutingNumberField returns a space padded string of ACHOperatorRoutingNumber

AdviceRoutingNumberField gets the AdviceRoutingNumber with zero padding

AmountField returns a zero padded string of amount

func (v *ADVEntryDetail) CalculateCheckDigit(routingNumber string) int

DFIAccountNumberField gets the DFIAccountNumber with space padding

DiscretionaryDataField returns a space padded string of DiscretionaryData

FileIdentificationField returns a space padded string of FileIdentification

IndividualNameField returns a space padded string of IndividualName

func (*ADVEntryDetail) JulianDateDayField added in v0.5.0

JulianDateDayField returns a zero padded string of JulianDay

RDFIIdentificationField get the rdfiIdentification with zero padding

SequenceNumberField returns a zero padded string of SequenceNumber

SetRDFI takes the 9 digit RDFI account number and separates it for RDFIIdentification and CheckDigit

String writes the ADVEntryDetail struct to a 94 character string.

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

type ADVFileControl struct {
	
	ID string `json:"id"`

	
	BatchCount int `json:"batchCount"`

	
	
	BlockCount int `json:"blockCount"`

	
	EntryAddendaCount int `json:"entryAddendaCount"`

	
	EntryHash int `json:"entryHash"`

	
	TotalDebitEntryDollarAmountInFile int `json:"totalDebit"`

	
	TotalCreditEntryDollarAmountInFile int `json:"totalCredit"`

	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

ADVFileControl record contains entry counts, dollar totals and hash totals accumulated from each batchADV control record in the file.

NewADVFileControl returns a new ADVFileControl with default values for none exported fields

BatchCountField gets a string of the batch count zero padded

BlockCountField gets a string of the block count zero padded

func (v *ADVFileControl) CalculateCheckDigit(routingNumber string) int

EntryAddendaCountField gets a string of entry addenda batch count zero padded

EntryHashField gets a string of entry hash zero padded

Parse takes the input record string and parses the FileControl values Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

String writes the ADVFileControl struct to a 94 character string.

TotalCreditEntryDollarAmountInFileField get a zero padded Total credit Entry Amount

TotalDebitEntryDollarAmountInFileField get a zero padded Total debit Entry Amount

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

type Addenda02 struct {
	
	ID string `json:"id"`
	
	TypeCode string `json:"typeCode"`
	
	
	ReferenceInformationOne string `json:"referenceInformationOne,omitempty"`
	
	
	ReferenceInformationTwo string `json:"referenceInformationTwo,omitempty"`
	
	
	TerminalIdentificationCode string `json:"terminalIdentificationCode"`
	
	
	
	TransactionSerialNumber string `json:"transactionSerialNumber"`
	
	TransactionDate string `json:"transactionDate"`
	
	AuthorizationCodeOrExpireDate string `json:"authorizationCodeOrExpireDate,omitempty"`
	
	
	TerminalLocation string `json:"terminalLocation"`
	
	TerminalCity string `json:"terminalCity"`
	
	TerminalState string `json:"terminalState"`
	
	
	
	TraceNumber string `json:"traceNumber,omitempty"`
	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

Addenda02 is a Addendumer addenda which provides business transaction information for Addenda Type Code 02 in a machine readable format. It is usually formatted according to ANSI, ASC, X12 Standard. It is used for following StandardEntryClassCode: MTE, POS, and SHR.

NewAddenda02 returns a new Addenda02 with default values for none exported fields

AuthorizationCodeOrExpireDateField returns a space padded AuthorizationCodeOrExpireDate string

func (v *Addenda02) CalculateCheckDigit(routingNumber string) int

Parse takes the input record string and parses the Addenda02 values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

ReferenceInformationOneField returns a space padded ReferenceInformationOne string

ReferenceInformationTwoField returns a space padded ReferenceInformationTwo string

String writes the Addenda02 struct to a 94 character string.

TerminalCityField returns a space padded TerminalCity string

TerminalIdentificationCodeField returns a space padded TerminalIdentificationCode string

TerminalLocationField returns a space padded TerminalLocation string

TerminalStateField returns a space padded TerminalState string

TraceNumberField returns a space padded TraceNumber string

TransactionDateField returns TransactionDate MMDD string

TransactionSerialNumberField returns a zero padded TransactionSerialNumber string

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

type Addenda05 struct {
	
	ID string `json:"id"`
	
	TypeCode string `json:"typeCode"`
	PaymentRelatedInformation string `json:"paymentRelatedInformation"`
	
	
	
	SequenceNumber int `json:"sequenceNumber"`
	
	
	
	
	EntryDetailSequenceNumber int `json:"entryDetailSequenceNumber"`
	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

Addenda05 is a Addendumer addenda which provides business transaction information for Addenda Type Code 05 in a machine readable format. It is usually formatted according to ANSI, ASC, X12 Standard. It is used for the following StandardEntryClassCode: ACK, ATX, CCD, CIE, CTX, DNE, ENR, WEB, PPD, TRX.

NewAddenda05 returns a new Addenda05 with default values for none exported fields

func (v *Addenda05) CalculateCheckDigit(routingNumber string) int

EntryDetailSequenceNumberField returns a zero padded EntryDetailSequenceNumber string

Parse takes the input record string and parses the Addenda05 values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

PaymentRelatedInformationField returns a zero padded PaymentRelatedInformation string

SequenceNumberField returns a zero padded SequenceNumber string

String writes the Addenda05 struct to a 94 character string.

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

type Addenda10 struct {
	
	ID string `json:"id"`
	
	TypeCode string `json:"typeCode"`
	
	
	
	
	
	TransactionTypeCode string `json:"transactionTypeCode"`
	
	
	ForeignPaymentAmount int `json:"foreignPaymentAmount"`
	
	ForeignTraceNumber string `json:"foreignTraceNumber,omitempty"`
	
	Name string `json:"name"`
	
	
	
	
	EntryDetailSequenceNumber int `json:"entryDetailSequenceNumber"`
	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

Addenda10 is an addenda which provides business transaction information for Addenda Type Code 10 in a machine readable format. It is usually formatted according to ANSI, ASC, X12 Standard.

Addenda10 is mandatory for IAT entries

The Addenda10 Record identifies the Receiver of the transaction and the dollar amount of the payment.

NewAddenda10 returns a new Addenda10 with default values for none exported fields

func (v *Addenda10) CalculateCheckDigit(routingNumber string) int

EntryDetailSequenceNumberField returns a zero padded EntryDetailSequenceNumber string

ForeignPaymentAmountField returns ForeignPaymentAmount zero padded ToDo: Review/Add logic for blank ?

ForeignTraceNumberField gets the Foreign TraceNumber left padded

NameField gets the name field - Receiving Company Name/Individual Name left padded

Parse takes the input record string and parses the Addenda10 values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

String writes the Addenda10 struct to a 94 character string.

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

type Addenda11 struct {
	
	ID string `json:"id"`
	
	TypeCode string `json:"typeCode"`
	
	OriginatorName string `json:"originatorName"`
	
	OriginatorStreetAddress string `json:"originatorStreetAddress"`
	
	
	
	
	EntryDetailSequenceNumber int `json:"entryDetailSequenceNumber"`
	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

Addenda11 is an addenda which provides business transaction information for Addenda Type Code 11 in a machine readable format. It is usually formatted according to ANSI, ASC, X12 Standard.

Addenda11 is mandatory for IAT entries

The Addenda11 record identifies key information related to the Originator of the entry.

NewAddenda11 returns a new Addenda11 with default values for none exported fields

func (v *Addenda11) CalculateCheckDigit(routingNumber string) int

EntryDetailSequenceNumberField returns a zero padded EntryDetailSequenceNumber string

OriginatorNameField gets the OriginatorName field - Originator Company Name/Individual Name left padded

OriginatorStreetAddressField gets the OriginatorStreetAddress field - Originator Street Address left padded

Parse takes the input record string and parses the Addenda11 values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

String writes the Addenda11 struct to a 94 character string.

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

type Addenda12 struct {
	
	ID string `json:"id"`
	
	TypeCode string `json:"typeCode"`
	
	
	
	
	OriginatorCityStateProvince string `json:"originatorCityStateProvince"`
	
	
	
	OriginatorCountryPostalCode string `json:"originatorCountryPostalCode"`
	
	
	
	
	EntryDetailSequenceNumber int `json:"entryDetailSequenceNumber"`
	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

Addenda12 is an addenda which provides business transaction information for Addenda Type Code 12 in a machine readable format. It is usually formatted according to ANSI, ASC, X12 Standard.

Addenda12 is mandatory for IAT entries

The Addenda12 record identifies key information related to the Originator of the entry.

NewAddenda12 returns a new Addenda12 with default values for none exported fields

func (v *Addenda12) CalculateCheckDigit(routingNumber string) int

EntryDetailSequenceNumberField returns a zero padded EntryDetailSequenceNumber string

OriginatorCityStateProvinceField gets the OriginatorCityStateProvinceField left padded

OriginatorCountryPostalCodeField gets the OriginatorCountryPostalCode field left padded

Parse takes the input record string and parses the Addenda12 values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

String writes the Addenda12 struct to a 94 character string.

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

type Addenda13 struct {
	
	ID string `json:"id"`
	
	TypeCode string `json:"typeCode"`
	
	
	
	ODFIName string `json:"ODFIName"`
	
	
	
	
	
	
	ODFIIDNumberQualifier string `json:"ODFIIDNumberQualifier"`
	
	
	
	
	ODFIIdentification string `json:"ODFIIdentification"`
	
	
	
	
	
	
	
	ODFIBranchCountryCode string `json:"ODFIBranchCountryCode"`
	
	
	
	
	EntryDetailSequenceNumber int `json:"entryDetailSequenceNumber"`
	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

Addenda13 is an addenda which provides business transaction information for Addenda Type Code 13 in a machine readable format. It is usually formatted according to ANSI, ASC, X13 Standard.

Addenda13 is mandatory for IAT entries

The Addenda13 contains information related to the financial institution originating the entry. For inbound IAT entries, the Fourth Addenda Record must contain information to identify the foreign financial institution that is providing the funding and payment instruction for the IAT entry.

NewAddenda13 returns a new Addenda13 with default values for none exported fields

func (v *Addenda13) CalculateCheckDigit(routingNumber string) int

EntryDetailSequenceNumberField returns a zero padded EntryDetailSequenceNumber string

ODFIBranchCountryCodeField gets the ODFIBranchCountryCode field left padded

ODFIIDNumberQualifierField gets the ODFIIDNumberQualifier field left padded

ODFIIdentificationField gets the ODFIIdentificationCode field left padded

ODFINameField gets the ODFIName field left padded

Parse takes the input record string and parses the Addenda13 values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

String writes the Addenda13 struct to a 94 character string.

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

type Addenda14 struct {
	
	ID string `json:"id"`
	
	TypeCode string `json:"typeCode"`
	
	RDFIName string `json:"RDFIName"`
	
	
	
	
	
	
	RDFIIDNumberQualifier string `json:"RDFIIDNumberQualifier"`
	
	
	
	RDFIIdentification string `json:"RDFIIdentification"`
	
	
	
	
	
	
	
	RDFIBranchCountryCode string `json:"RDFIBranchCountryCode"`
	
	
	
	
	EntryDetailSequenceNumber int `json:"entryDetailSequenceNumber"`
	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

Addenda14 is an addenda which provides business transaction information for Addenda Type Code 14 in a machine readable format. It is usually formatted according to ANSI, ASC, X14 Standard.

Addenda14 is mandatory for IAT entries

The Addenda14 identifies the Receiving financial institution holding the Receiver's account.

NewAddenda14 returns a new Addenda14 with default values for none exported fields

func (v *Addenda14) CalculateCheckDigit(routingNumber string) int

EntryDetailSequenceNumberField returns a zero padded EntryDetailSequenceNumber string

Parse takes the input record string and parses the Addenda14 values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

RDFIBranchCountryCodeField gets the RDFIBranchCountryCode field left padded

RDFIIDNumberQualifierField gets the RDFIIDNumberQualifier field left padded

RDFIIdentificationField gets the RDFIIdentificationCode field left padded

RDFINameField gets the RDFIName field left padded

String writes the Addenda14 struct to a 94 character string.

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

type Addenda15 struct {
	
	ID string `json:"id"`
	
	TypeCode string `json:"typeCode"`
	
	
	
	ReceiverIDNumber string `json:"receiverIDNumber,omitempty"`
	
	ReceiverStreetAddress string `json:"receiverStreetAddress"`
	
	
	
	
	EntryDetailSequenceNumber int `json:"entryDetailSequenceNumber"`
	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

Addenda15 is an addenda which provides business transaction information for Addenda Type Code 15 in a machine readable format. It is usually formatted according to ANSI, ASC, X12 Standard.

Addenda15 is mandatory for IAT entries

The Addenda15 record identifies key information related to the Receiver.

NewAddenda15 returns a new Addenda15 with default values for none exported fields

func (v *Addenda15) CalculateCheckDigit(routingNumber string) int

EntryDetailSequenceNumberField returns a zero padded EntryDetailSequenceNumber string

Parse takes the input record string and parses the Addenda15 values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

ReceiverIDNumberField gets the ReceiverIDNumber field left padded

ReceiverStreetAddressField gets the ReceiverStreetAddressField field left padded

String writes the Addenda15 struct to a 94 character string.

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

type Addenda16 struct {
	
	ID string `json:"id"`
	
	TypeCode string `json:"typeCode"`
	
	
	
	
	ReceiverCityStateProvince string `json:"receiverCityStateProvince"`
	
	
	
	ReceiverCountryPostalCode string `json:"receiverCountryPostalCode"`
	
	
	
	
	EntryDetailSequenceNumber int `json:"entryDetailSequenceNumber"`
	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

Addenda16 is an addenda which provides business transaction information for Addenda Type Code 16 in a machine readable format. It is usually formatted according to ANSI, ASC, X16 Standard.

Addenda16 is mandatory for IAT entries

The Addenda16 record identifies key information related to the Receiver.

NewAddenda16 returns a new Addenda16 with default values for none exported fields

func (v *Addenda16) CalculateCheckDigit(routingNumber string) int

EntryDetailSequenceNumberField returns a zero padded EntryDetailSequenceNumber string

Parse takes the input record string and parses the Addenda16 values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

ReceiverCityStateProvinceField gets the ReceiverCityStateProvinceField left padded

ReceiverCountryPostalCodeField gets the ReceiverCountryPostalCode field left padded

String writes the Addenda16 struct to a 94 character string.

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

type Addenda17 struct {
	
	ID string `json:"id"`
	
	TypeCode string `json:"typeCode"`
	PaymentRelatedInformation string `json:"paymentRelatedInformation"`
	
	
	
	SequenceNumber int `json:"sequenceNumber"`
	
	
	
	
	EntryDetailSequenceNumber int `json:"entryDetailSequenceNumber"`
	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

Addenda17 is an addenda which provides business transaction information for Addenda Type Code 17 in a machine readable format. It is usually formatted according to ANSI, ASC, X12 Standard.

Addenda17 is optional for IAT entries

The Addenda17 record identifies payment-related data. A maximum of two of these Addenda Records may be included with each IAT entry.

NewAddenda17 returns a new Addenda17 with default values for none exported fields

func (v *Addenda17) CalculateCheckDigit(routingNumber string) int

EntryDetailSequenceNumberField returns a zero padded EntryDetailSequenceNumber string

Parse takes the input record string and parses the Addenda17 values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

PaymentRelatedInformationField returns a zero padded PaymentRelatedInformation string

SequenceNumberField returns a zero padded SequenceNumber string

String writes the Addenda17 struct to a 94 character string.

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

type Addenda18 struct {
	
	ID string `json:"id"`
	
	TypeCode string `json:"typeCode"`
	
	ForeignCorrespondentBankName string `json:"foreignCorrespondentBankName"`
	
	
	
	
	
	
	ForeignCorrespondentBankIDNumberQualifier string `json:"foreignCorrespondentBankIDNumberQualifier"`
	
	
	ForeignCorrespondentBankIDNumber string `json:"foreignCorrespondentBankIDNumber"`
	
	
	
	
	ForeignCorrespondentBankBranchCountryCode string `json:"foreignCorrespondentBankBranchCountryCode"`
	
	
	
	SequenceNumber int `json:"sequenceNumber"`
	
	
	
	
	EntryDetailSequenceNumber int `json:"entryDetailSequenceNumber"`
	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

Addenda18 is an addenda which provides business transaction information for Addenda Type Code 18 in a machine readable format. It is usually formatted according to ANSI, ASC, X12 Standard.

Addenda18 is optional for IAT entries

The Addenda18 record identifies information on each Foreign Correspondent Bank involved in the processing of the IAT entry. If no Foreign Correspondent Bank is involved,t he record should not be included. A maximum of five of these Addenda Records may be included with each IAT entry.

NewAddenda18 returns a new Addenda18 with default values for none exported fields

func (v *Addenda18) CalculateCheckDigit(routingNumber string) int

EntryDetailSequenceNumberField returns a zero padded EntryDetailSequenceNumber string

func (addenda18 *Addenda18) ForeignCorrespondentBankBranchCountryCodeField() string

ForeignCorrespondentBankBranchCountryCodeField returns a zero padded ForeignCorrespondentBankBranchCountryCode string

ForeignCorrespondentBankIDNumberField returns a zero padded ForeignCorrespondentBankIDNumber string

func (addenda18 *Addenda18) ForeignCorrespondentBankIDNumberQualifierField() string

ForeignCorrespondentBankIDNumberQualifierField returns a zero padded ForeignCorrespondentBankIDNumberQualifier string

ForeignCorrespondentBankNameField returns a zero padded ForeignCorrespondentBankName string

Parse takes the input record string and parses the Addenda18 values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

SequenceNumberField returns a zero padded SequenceNumber string

String writes the Addenda18 struct to a 94 character string.

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

type Addenda98 struct {
	
	ID string `json:"id"`
	
	TypeCode string `json:"typeCode"`
	
	
	ChangeCode string `json:"changeCode"`
	
	
	
	OriginalTrace string `json:"originalTrace"`
	
	OriginalDFI string `json:"originalDFI"`
	
	CorrectedData string `json:"correctedData"`
	
	LineNumber int `json:"lineNumber,omitempty"`

	
	
	
	TraceNumber string `json:"traceNumber,omitempty"`
	
}

Addenda98 is a Addendumer addenda record format for Notification OF Change(98) The field contents for Notification of Change Entries must match the field contents of the original Entries

NewAddenda98 returns an reference to an instantiated Addenda98 with default values

func (v *Addenda98) CalculateCheckDigit(routingNumber string) int

CorrectedDataField returns a space padded CorrectedData string

IATCorrectedDataField returns a space padded CorrectedData string for IAT entries, which is a slightly larger field than typical CorrectedData values.

OriginalDFIField returns a zero padded OriginalDFI string

OriginalTraceField returns a zero padded OriginalTrace string

Parse takes the input record string and parses the Addenda98 values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

ParseCorrectedData returns a struct with some fields filled in depending on the Addenda98's Code and CorrectedData. Fields are trimmed when populated in this struct.

String writes the Addenda98 struct to a 94 character string

TraceNumberField returns a zero padded traceNumber string

Validate verifies NACHA rules for Addenda98

type Addenda98Refused struct {
	
	ID string `json:"id"`

	
	TypeCode string `json:"typeCode"`

	
	RefusedChangeCode string `json:"refusedChangeCode"`

	
	
	
	OriginalTrace string `json:"originalTrace"`

	
	
	OriginalDFI string `json:"originalDFI"`

	
	CorrectedData string `json:"correctedData"`

	
	ChangeCode string `json:"changeCode"`

	
	TraceSequenceNumber string `json:"traceSequenceNumber"`

	
	
	
	TraceNumber string `json:"traceNumber"`

	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

NewAddenda98Refused returns an reference to an instantiated Addenda98Refused with default values

func (v *Addenda98Refused) CalculateCheckDigit(routingNumber string) int

CorrectedDataField returns a space padded CorrectedData string

OriginalDFIField returns a zero padded OriginalDFI string

OriginalTraceField returns a zero padded OriginalTrace string

Parse takes the input record string and parses the Addenda98Refused values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

String writes the Addenda98 struct to a 94 character string

TraceNumberField returns a zero padded traceNumber string

Validate verifies NACHA rules for Addenda98

type Addenda99 struct {
	
	ID string `json:"id"`
	
	TypeCode string `json:"typeCode"`
	
	
	ReturnCode string `json:"returnCode"`
	
	
	
	OriginalTrace string `json:"originalTrace"`
	
	DateOfDeath string `json:"dateOfDeath"`
	
	OriginalDFI string `json:"originalDFI"`
	
	AddendaInformation string `json:"addendaInformation,omitempty"`
	
	
	
	TraceNumber string `json:"traceNumber,omitempty"`
	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

Addenda99 utilized for Notification of Change Entry (COR) and Return types.

NewAddenda99 returns a new Addenda99 with default values for none exported fields

AddendaInformationField returns a space padded AddendaInformation string

func (Addenda99 *Addenda99) AddendaInformationReturnSettlementDate() string
func (v *Addenda99) CalculateCheckDigit(routingNumber string) int

DateOfDeathField returns a space padded DateOfDeath string

IATAddendaInformation sets Addenda Information for IAT return items, characters 10-44 of underlying AddendaInformation

IATAddendaInformationField returns a space padded AddendaInformation string, characters 10-44 of underlying AddendaInformation

IATPaymentAmount sets original forward entry payment amount characters 1-10 of underlying AddendaInformation

IATPaymentAmountField returns original forward entry payment amount int, characters 1-10 of underlying AddendaInformation

OriginalDFIField returns a zero padded OriginalDFI string

OriginalTraceField returns a zero padded OriginalTrace string

Parse takes the input record string and parses the Addenda99 values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

ReturnCodeField gives the ReturnCode struct for the given Addenda99 record

SetValidation stores ValidateOpts on the Batch which are to be used to override the default NACHA validation rules.

String writes the Addenda99 struct to a 94 character string

TraceNumberField returns a zero padded TraceNumber string

Validate verifies NACHA rules for Addenda99

type Addenda99Contested struct {
	
	ID string `json:"id"`

	
	TypeCode string `json:"typeCode"`

	
	ContestedReturnCode string `json:"contestedReturnCode"`

	
	OriginalEntryTraceNumber string `json:"originalEntryTraceNumber"`

	
	DateOriginalEntryReturned string `json:"dateOriginalEntryReturned"`

	
	OriginalReceivingDFIIdentification string `json:"originalReceivingDFIIdentification"`

	
	OriginalSettlementDate string `json:"originalSettlementDate"`

	
	ReturnTraceNumber string `json:"returnTraceNumber"`

	
	ReturnSettlementDate string `json:"returnSettlementDate"`

	
	ReturnReasonCode string `json:"returnReasonCode"`

	
	DishonoredReturnTraceNumber string `json:"dishonoredReturnTraceNumber"`

	
	DishonoredReturnSettlementDate string `json:"dishonoredReturnSettlementDate"`

	
	DishonoredReturnReasonCode string `json:"dishonoredReturnReasonCode"`

	
	TraceNumber string `json:"traceNumber"`

	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

NewAddenda99Contested returns a new Addenda99Contested with default values for none exported fields

func (v *Addenda99Contested) CalculateCheckDigit(routingNumber string) int

SetValidation stores ValidateOpts on the Batch which are to be used to override the default NACHA validation rules.

Validate verifies NACHA rules for Addenda99Contested

type Addenda99Dishonored struct {
	
	ID string `json:"id"`

	
	TypeCode string `json:"typeCode"`

	
	DishonoredReturnReasonCode string `json:"dishonoredReturnReasonCode"`

	
	OriginalEntryTraceNumber string `json:"originalEntryTraceNumber"`

	
	OriginalReceivingDFIIdentification string `json:"originalReceivingDFIIdentification"`

	
	ReturnTraceNumber string `json:"returnTraceNumber"`

	
	ReturnSettlementDate string `json:"returnSettlementDate"`

	
	ReturnReasonCode string `json:"returnReasonCode"`

	
	AddendaInformation string `json:"addendaInformation"`

	
	TraceNumber string `json:"traceNumber"`

	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

NewAddenda99Dishonored returns a new Addenda99Dishonored with default values for none exported fields

func (v *Addenda99Dishonored) CalculateCheckDigit(routingNumber string) int

OriginalEntryTraceNumberField returns a zero padded TraceNumber string

SetValidation stores ValidateOpts on the Batch which are to be used to override the default NACHA validation rules.

TraceNumberField returns a zero padded TraceNumber string

Validate verifies NACHA rules for Addenda99Dishonored

Batch holds the Batch Header and Batch Control and all Entry Records

AddADVEntry appends an ADV EntryDetail to the Batch

AddEntry appends an EntryDetail to the Batch

Category returns batch category

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

DeleteADVEntries deletes all ADV Entries from the Batch where del() == true

DeleteEntries deletes all Entries from the Batch where del() == true

Equal returns true only if two Batch (or any Batcher) objects are equal. Equality is determined by many of the ACH Batch and EntryDetail properties.

error returns a new BatchError based on err

GetADVControl returns the current Batch ADVControl

GetADVEntries returns a slice of entry details for the batch

GetControl returns the current Batch Control

GetEntries returns a slice of entry details for the batch

GetHeader returns the current Batch header

ID returns the id of the batch

IsADV determines if a batch is batch type ADV - BatchADV

SetADVControl appends an BatchADVControl to the Batch

SetControl appends an BatchControl to the Batch

SetHeader appends an BatchHeader to the Batch

SetValidation stores ValidateOpts on the Batch which are to be used to override the default NACHA validation rules.

ValidTranCodeForServiceClassCode validates a TransactionCode is valid for a ServiceClassCode

Validate checks properties of the ACH batch to ensure they match NACHA guidelines. This includes computing checksums, totals, and sequence orderings.

Validate will never modify the batch.

WithOffset sets the Offset information onto a Batch so that during Create a balanced offset record(s) at the end of each batch.

If there are debits, there is a credit offset matching the sum of the debits. If there are credits, there is a debit offset matching the sum of the credits. They are mutually exclusive.

type BatchACK struct {
	Batch
}

BatchACK is a batch file that handles SEC payment type ACK and ACK+. Acknowledgement of a Corporate credit by the Receiving Depository Financial Institution (RDFI). For commercial accounts only.

NewBatchACK returns a *BatchACK

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate checks properties of the ACH batch to ensure they match NACHA guidelines. This includes computing checksums, totals, and sequence orderings.

Validate will never modify the batch.

type BatchADV struct {
	Batch
}

BatchADV holds the Batch Header and Batch Control and all Entry Records for ADV Entries

The ADV entry identifies a Non-Monetary Entry that is used by an ACH Operator to provide accounting information regarding an entry to participating DFI's. It's an optional service provided by ACH operators and must be requested by a DFI wanting the service.

NewBatchADV returns a *BatchADV

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate checks properties of the ACH batch to ensure they match NACHA guidelines. This includes computing checksums, totals, and sequence orderings.

Validate will never modify the batch.

type BatchARC struct {
	Batch
}

BatchARC holds the BatchHeader and BatchControl and all EntryDetail for ARC Entries.

Accounts Receivable Entry (ARC). A consumer check converted to a one-time ACH debit. The Accounts Receivable (ARC) Entry provides billers the opportunity to initiate single-entry ACH debits to customer accounts by converting checks at the point of receipt through the U.S. mail, at a drop box location or in-person for payment of a bill at a manned location. The biller is required to provide the customer with notice prior to the acceptance of the check that states the receipt of the customer's check will be deemed as the authorization for an ARC debit entry to the customer's account. The provision of the notice and the receipt of the check together constitute authorization for the ARC entry. The customer's check is solely be used as a source document to obtain the routing number, account number and check serial number.

The difference between ARC and POP is that ARC can result from a check mailed in whereas POP is in-person.

NewBatchARC returns a *BatchARC

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate checks properties of the ACH batch to ensure they match NACHA guidelines. This includes computing checksums, totals, and sequence orderings.

Validate will never modify the batch.

type BatchATX struct {
	Batch
}

BatchATX holds the BatchHeader and BatchControl and all EntryDetail for ATX (Acknowledgment) Entries.

The ATX entry is an acknowledgement by the Receiving Depository Financial Institution (RDFI) that a Corporate Credit (CTX) has been received.

NewBatchATX returns a *BatchATX

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate checks properties of the ACH batch to ensure they match NACHA guidelines. This includes computing checksums, totals, and sequence orderings.

Validate will never modify the batch.

type BatchBOC struct {
	Batch
}

BatchBOC holds the BatchHeader and BatchControl and all EntryDetail for BOC Entries.

Back Office Conversion (BOC) A single entry debit initiated at the point of purchase or at a manned bill payment location to transfer funds through conversion to an ACH debit entry during back office processing.

BOC allows retailers/billers, and ODFIs acting as Originators, to electronically convert checks received at the point-of-purchase as well as at a manned bill payment location into a single-entry ACH debit. The authorization to convert the check will be obtained through a notice at the checkout or manned bill payment location (e.g., loan payment at financial institution's teller window) and the receipt of the Receiver's check. The decision to process the check item as an ACH debit will be made in the “back office” instead of at the point-of-purchase. The customer's check will solely be used as a source document to obtain the routing number, account number and check serial number.

Unlike ARC entries, BOC conversions require the customer to be present and a notice that checks may be converted to BOC ACH entries be posted.

NewBatchBOC returns a *BatchBOC

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate checks properties of the ACH batch to ensure they match NACHA guidelines. This includes computing checksums, totals, and sequence orderings.

Validate will never modify the batch.

type BatchCCD struct {
	Batch
}

BatchCCD is a batch file that handles SEC payment type CCD and CCD+. Corporate credit or debit. Identifies an Entry initiated by an Organization to transfer funds to or from an account of that Organization or another Organization. For commercial accounts only.

NewBatchCCD returns a *BatchCCD

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate ensures the batch meets NACHA rules specific to this batch type.

type BatchCIE struct {
	Batch
}

BatchCIE holds the BatchHeader and BatchControl and all EntryDetail for CIE Entries.

Customer-Initiated Entry (or CIE entry) is a credit entry initiated on behalf of, and upon the instruction of, a consumer to transfer funds to a non-consumer Receiver. CIE entries are usually transmitted to a company for payment of funds that the consumer owes to that company and are initiated by the consumer through some type of online banking product or bill payment service provider. With CIEs, funds owed by the consumer are “pushed” to the biller in the form of an ACH credit, as opposed to the biller's use of a debit application (e.g., PPD, WEB) to “pull” the funds from a customer's account.

NewBatchCIE returns a *BatchCIE

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate checks properties of the ACH batch to ensure they match NACHA guidelines. This includes computing checksums, totals, and sequence orderings.

Validate will never modify the batch.

type BatchCOR struct {
	Batch
}

BatchCOR COR - Automated Notification of Change (NOC) or Refused Notification of Change This Standard Entry Class Code is used by an RDFI or ODFI when originating a Notification of Change or Refused Notification of Change in automated format. A Notification of Change may be created by an RDFI to notify the ODFI that a posted Entry or Prenotification Entry contains invalid or erroneous information and should be changed.

NewBatchCOR returns a *BatchCOR

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate ensures the batch meets NACHA rules specific to this batch type.

type BatchCTX struct {
	Batch
}

BatchCTX holds the BatchHeader and BatchControl and all EntryDetail for CTX Entries.

The Corporate Trade Exchange (CTX) application provides the ability to collect and disburse funds and information between companies. Generally it is used by businesses paying one another for goods or services. These payments replace checks with an electronic process of debiting and crediting invoices between the financial institutions of participating companies.

NewBatchCTX returns a *BatchCTX

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate checks properties of the ACH batch to ensure they match NACHA guidelines. This includes computing checksums, totals, and sequence orderings.

Validate will never modify the batch.

type BatchControl struct {
	
	ID string `json:"id"`
	
	
	
	
	
	ServiceClassCode int `json:"serviceClassCode"`
	
	
	EntryAddendaCount int `json:"entryAddendaCount"`
	
	
	
	
	
	
	EntryHash int `json:"entryHash"`
	
	TotalDebitEntryDollarAmount int `json:"totalDebit"`
	
	TotalCreditEntryDollarAmount int `json:"totalCredit"`
	
	
	
	
	
	
	
	
	
	
	
	CompanyIdentification string `json:"companyIdentification"`
	
	
	
	
	
	
	MessageAuthenticationCode string `json:"messageAuthentication,omitempty"`
	
	ODFIIdentification string `json:"ODFIIdentification"`
	
	
	
	
	BatchNumber int `json:"batchNumber"`
	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

BatchControl contains entry counts, dollar total and has totals for all entries contained in the preceding batch

NewBatchControl returns a new BatchControl with default values for none exported fields

BatchNumberField gets a string of the batch number zero padded

func (v *BatchControl) CalculateCheckDigit(routingNumber string) int

CompanyIdentificationField get the CompanyIdentification right padded

EntryAddendaCountField gets a string of the addenda count zero padded

EntryHashField get a zero padded EntryHash

MessageAuthenticationCodeField get the MessageAuthenticationCode right padded

ODFIIdentificationField get the odfi number zero padded

Parse takes the input record string and parses the EntryDetail values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

String writes the BatchControl struct to a 94 character string.

TotalCreditEntryDollarAmountField get a zero padded Credit Entry Amount

TotalDebitEntryDollarAmountField get a zero padded Debit Entry Amount

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

type BatchDNE struct {
	Batch
}

BatchDNE is a batch file that handles SEC code Death Notification Entry (DNE) United States Federal agencies (e.g. Social Security) use this to notify depository financial institutions that the recipient of government benefit payments has died.

Notes:

NewBatchDNE returns a *BatchDNE

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate ensures the batch meets NACHA rules specific to this batch type.

type BatchENR struct {
	Batch
}

BatchENR is a non-monetary entry that enrolls a person with an agency of the US government for a depository financial institution.

Allowed TransactionCode values: 22 Demand Credit, 27 Demand Debit, 32 Savings Credit, 37 Savings Debit

NewBatchENR returns a *BatchENR

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate ensures the batch meets NACHA rules specific to this batch type.

type BatchError struct {
	BatchNumber int
	BatchType   string
	FieldName   string
	FieldValue  interface{}
	Err         error
}

BatchError is an Error that describes batch validation issues

Unwrap implements the base.UnwrappableError interface for BatchError

type BatchHeader struct {
	ID string `json:"id"`

	
	
	ServiceClassCode int `json:"serviceClassCode"`

	CompanyName string `json:"companyName"`

	
	
	
	
	CompanyDiscretionaryData string `json:"companyDiscretionaryData,omitempty"`

	
	CompanyIdentification string `json:"companyIdentification"`

	
	
	
	
	
	
	
	StandardEntryClassCode string `json:"standardEntryClassCode"`

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	CompanyEntryDescription string `json:"companyEntryDescription,omitempty"`

	
	
	
	
	
	
	
	
	
	
	CompanyDescriptiveDate string `json:"companyDescriptiveDate,omitempty"`

	EffectiveEntryDate string `json:"effectiveEntryDate,omitempty"`

	SettlementDate string `json:"settlementDate,omitempty"`

	
	
	
	OriginatorStatusCode int `json:"originatorStatusCode,omitempty"`

	ODFIIdentification string `json:"ODFIIdentification"`

	
	
	
	
	BatchNumber int `json:"batchNumber"`

	LineNumber int `json:"lineNumber,omitempty"`
	
}

BatchHeader identifies the originating entity and the type of transactions contained in the batch (i.e., the standard entry class, PPD for consumer, CCD or CTX for corporate). This record also contains the effective date, or desired settlement date, for all entries contained in this batch. The settlement date field is not entered as it is determined by the ACH operator

NewBatchHeader returns a new BatchHeader with default values for non exported fields

BatchNumberField get the batch number zero padded

func (v *BatchHeader) CalculateCheckDigit(routingNumber string) int

CompanyDescriptiveDateField get the CompanyDescriptiveDate left padded

CompanyDiscretionaryDataField get the CompanyDiscretionaryData left padded

CompanyEntryDescriptionField get the CompanyEntryDescription left padded

CompanyIdentificationField get the CompanyIdentification left padded

CompanyNameField get the CompanyName left padded

EffectiveEntryDateField get the EffectiveEntryDate in YYMMDD format

Equal returns true only if two BatchHeaders are equal. Equality is determined by the Nacha defined fields of each record.

ODFIIdentificationField get the odfi number zero padded

Parse takes the input record string and parses the BatchHeader values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

SetValidation stores ValidateOpts on the BatchHeader which are to be used to override the default NACHA validation rules.

String writes the BatchHeader struct to a 94 character string.

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

type BatchMTE struct {
	Batch
}

BatchMTE holds the BatchHeader, BatchControl, and EntryDetail for Machine Transfer Entry (MTE) entries.

A MTE transaction is created when a consumer uses their debit card at an Automated Teller Machine (ATM) to withdraw cash. MTE transactions cannot be aggregated together under a single Entry.

NewBatchMTE returns a *BatchMTE

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate checks properties of the ACH batch to ensure they match NACHA guidelines. This includes computing checksums, totals, and sequence orderings.

Validate will never modify the batch.

type BatchPOP struct {
	Batch
}

BatchPOP holds the BatchHeader and BatchControl and all EntryDetail for POP Entries.

Point-of-Purchase. A check presented in-person to a merchant for purchase is presented as an ACH entry instead of a physical check.

This ACH debit application is used by originators as a method of payment for the in-person purchase of goods or services by consumers. These Single Entry debit entries are initiated by the originator based on a written authorization and account information drawn from the source document (a check) obtained from the consumer at the point-of-purchase. The source document, which is voided by the merchant and returned to the consumer at the point-of-purchase, is used to collect the consumer's routing number, account number and check serial number that will be used to generate the debit entry to the consumer's account.

The difference between POP and ARC is that ARC can result from a check mailed in whereas POP is in-person.

NewBatchPOP returns a *BatchPOP

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate checks properties of the ACH batch to ensure they match NACHA guidelines. This includes computing checksums, totals, and sequence orderings.

Validate will never modify the batch.

type BatchPOS struct {
	Batch
}

BatchPOS holds the BatchHeader and BatchControl and all EntryDetail for POS Entries.

A POS Entry is a debit Entry initiated at an “electronic terminal” to a consumer account of the receiver to pay an obligation incurred in a point- of-sale transaction, or to effect a point-of-sale terminal cash withdrawal.

Point-of-Sale Entries (POS) are ACH debit entries typically initiated by the use of a merchant-issued plastic card to pay an obligation at the point-of-sale. Much like a financial institution issued debit card, the merchant- issued debit card is swiped at the point-of-sale and approved for use; however, the authorization only verifies the card is open, active and within the card's limits—it does not verify the Receiver's account balance or debit the account at the time of the purchase. Settlement of the transaction moves from the card network to the ACH Network through the creation of a POS entry by the card issuer to debit the Receiver's account.

NewBatchPOS returns a *BatchPOS

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate checks properties of the ACH batch to ensure they match NACHA guidelines. This includes computing checksums, totals, and sequence orderings.

Validate will never modify the batch.

type BatchPPD struct {
	Batch
}

BatchPPD holds the Batch Header and Batch Control and all Entry Records for PPD Entries

NewBatchPPD returns a *BatchPPD

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate checks properties of the ACH batch to ensure they match NACHA guidelines. This includes computing checksums, totals, and sequence orderings.

Validate will never modify the batch.

type BatchRCK struct {
	Batch
}

BatchRCK holds the BatchHeader and BatchControl and all EntryDetail for RCK Entries.

Represented Check Entries (RCK). A physical check that was presented but returned because of insufficient funds may be represented as an ACH entry.

NewBatchRCK returns a *BatchRCK

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate checks properties of the ACH batch to ensure they match NACHA guidelines. This includes computing checksums, totals, and sequence orderings.

Validate will never modify the batch.

type BatchSHR struct {
	Batch
}

BatchSHR holds the BatchHeader and BatchControl and all EntryDetail for SHR Entries.

Shared Network Entry (SHR) is a debit Entry initiated at an “electronic terminal,” as that term is defined in Regulation E, to a Consumer Account of the Receiver to pay an obligation incurred in a point-of-sale transaction, or to effect a point-of-sale terminal cash withdrawal. Also an adjusting or other credit Entry related to such debit Entry, transfer of funds, or obligation. SHR Entries are initiated in a shared network where the ODFI and RDFI have an agreement in addition to these Rules to process such Entries.

NewBatchSHR returns a *BatchSHR

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate checks properties of the ACH batch to ensure they match NACHA guidelines. This includes computing checksums, totals, and sequence orderings.

Validate will never modify the batch.

type BatchTEL struct {
	Batch
}

BatchTEL is a batch that handles SEC payment type Telephone-Initiated Entries (TEL) Telephone-Initiated Entries (TEL) are consumer debit transactions. The NACHA Operating Rules permit TEL entries when the Originator obtains the Receiver's authorization for the debit entry orally via the telephone. An entry based upon a Receiver's oral authorization must utilize the TEL (Telephone-Initiated Entry) Standard Entry Class (SEC) Code.

NewBatchTEL returns a *BatchTEL

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate ensures the batch meets NACHA rules specific to the SEC type TEL

type BatchTRC struct {
	Batch
}

BatchTRC holds the BatchHeader and BatchControl and all EntryDetail for TRC Entries.

Check Truncation Entry (Truncated Entry) is used to identify a debit entry of a truncated check.

NewBatchTRC returns a *BatchTRC

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate checks properties of the ACH batch to ensure they match NACHA guidelines. This includes computing checksums, totals, and sequence orderings.

Validate will never modify the batch.

type BatchTRX struct {
	Batch
}

BatchTRX holds the BatchHeader and BatchControl and all EntryDetail for TRX Entries.

Check Truncation Entries Exchange is used to identify a debit entry of a truncated checks (multiple).

NewBatchTRX returns a *BatchTRX

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate checks properties of the ACH batch to ensure they match NACHA guidelines. This includes computing checksums, totals, and sequence orderings.

Validate will never modify the batch.

type BatchWEB struct {
	Batch
}

BatchWEB creates a batch file that handles SEC payment type WEB. Entry submitted pursuant to an authorization obtained solely via the Internet or a wireless network For consumer accounts only.

NewBatchWEB returns a *BatchWEB

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate ensures the batch meets NACHA rules specific to this batch type.

type BatchXCK struct {
	Batch
}

BatchXCK holds the BatchHeader and BatchControl and all EntryDetail for XCK Entries.

Destroyed Check Entry identifies a debit entry initiated for a XCK eligible items.

NewBatchXCK returns a *BatchXCK

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

InvalidEntries returns entries with validation errors in the batch

Validate checks properties of the ACH batch to ensure they match NACHA guidelines. This includes computing checksums, totals, and sequence orderings.

Validate will never modify the batch.

Batcher abstract the different ACH batch types that can exist in a file. Each batch type is defined by SEC (Standard Entry Class) code in the Batch Header * SEC identifies the payment type (product) found within an ACH batch-using a 3-character code * The SEC Code pertains to all items within batch

ConvertBatchType will take a batch object and convert it into one of the correct batch type

NewBatch takes a BatchHeader and returns a matching SEC code batch type that is a batcher. Returns an error if the SEC code is not supported.

type ChangeCode struct {
	Code        string `json:"code"`
	Reason      string `json:"reason"`
	Description string `json:"description"`
}

ChangeCode holds a change Code, Reason/Title, and Description table of return codes exists in Part 4.2 of the NACHA corporate rules and guidelines

LookupChangeCode will return a struct representing the reason and description for the provided NACHA change code.

type Conditions struct {
	
	MaxLines int `json:"maxLines"`

	
	MaxDollarAmount int64 `json:"maxDollarAmount"`
}

CorrectedData is a struct returned from our helper method for parsing the NOC/COR corrected data from Addenda98 records.

All fields are optional and a valid code may not have populated data in this struct.

type DNEPaymentInformation struct {
	DateOfDeath time.Time

	
	
	Amount string
}

ParseDNEPaymentInformation returns an DNEPaymentInformation for a given Addenda05 record. The information is parsed from the addenda's PaymentRelatedInformation field.

The returned information is not validated for correctness.

type ENRPaymentInformation struct {
	
	
	TransactionCode int

	
	RDFIIdentification string

	
	CheckDigit string

	
	DFIAccountNumber string

	
	
	IndividualIdentification string

	
	IndividualName string

	
	
	
	
	
	
	EnrolleeClassificationCode string
}

ENRPaymentInformation structure

ParseENRPaymentInformation returns an ENRPaymentInformation for a given Addenda05 record. The information is parsed from the addenda's PaymentRelatedInformation field.

The returned information is not validated for correctness.

type EntryDetail struct {
	
	ID string `json:"id"`
	
	TransactionCode int `json:"transactionCode"`
	
	
	RDFIIdentification string `json:"RDFIIdentification"`
	
	CheckDigit string `json:"checkDigit"`
	
	
	DFIAccountNumber string `json:"DFIAccountNumber"`
	
	Amount int `json:"amount"`
	
	
	IdentificationNumber string `json:"identificationNumber,omitempty"`
	
	IndividualName string `json:"individualName"`
	
	
	
	
	
	
	
	
	
	
	DiscretionaryData string `json:"discretionaryData,omitempty"`
	
	
	
	AddendaRecordIndicator int `json:"addendaRecordIndicator,omitempty"`
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	TraceNumber string `json:"traceNumber,omitempty"`
	
	Addenda02 *Addenda02 `json:"addenda02,omitempty"`
	
	Addenda05 []*Addenda05 `json:"addenda05,omitempty"`
	
	Addenda98 *Addenda98 `json:"addenda98,omitempty"`
	
	Addenda98Refused *Addenda98Refused `json:"addenda98Refused,omitempty"`
	
	Addenda99 *Addenda99 `json:"addenda99,omitempty"`
	
	Addenda99Contested *Addenda99Contested `json:"addenda99Contested,omitempty"`
	
	Addenda99Dishonored *Addenda99Dishonored `json:"addenda99Dishonored,omitempty"`
	
	Category string `json:"category,omitempty"`
	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

EntryDetail contains the actual transaction data for an individual entry. Fields include those designating the entry as a deposit (credit) or withdrawal (debit), the transit routing number for the entry recipient's financial institution, the account number (left justify,no zero fill), name, and dollar amount.

NewEntryDetail returns a new EntryDetail with default values for non exported fields

AddAddenda05 appends an Addenda05 to the EntryDetail

AmountField returns a zero padded string of amount

CATXAddendaRecordsField is used in CTX and ATX files, characters 1-4 of underlying IndividualName field

CATXReceivingCompanyField is used in CTX and ATX files, characters 5-20 of underlying IndividualName field

CATXReservedField is used in CTX and ATX files, characters 21-22 of underlying IndividualName field

func (v *EntryDetail) CalculateCheckDigit(routingNumber string) int

CheckSerialNumberField is used in RCK, ARC, BOC files but returns a space padded string of the underlying IdentificationNumber field

CreditOrDebit returns a "C" for credit or "D" for debit based on the entry TransactionCode

DFIAccountNumberField gets the DFIAccountNumber with space padding

DiscretionaryDataField returns a space padded string of DiscretionaryData

IdentificationNumberField returns a space padded string of IdentificationNumber

IndividualNameField returns a space padded string of IndividualName

ItemResearchNumber getter for TRC Item Research Number characters 7-22 of underlying IndividualName

ItemTypeIndicator getter for TRC Item Type Indicator which is underlying Discretionary Data

OriginalTraceNumberField is used in ACK and ATX files but returns the underlying IdentificationNumber field

POPCheckSerialNumberField is used in POP, characters 1-9 of underlying BatchPOP CheckSerialNumber / IdentificationNumber

POPTerminalCityField is used in POP, characters 10-13 of underlying BatchPOP CheckSerialNumber / IdentificationNumber

POPTerminalStateField is used in POP, characters 14-15 of underlying BatchPOP CheckSerialNumber / IdentificationNumber

Parse takes the input record string and parses the EntryDetail values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

PaymentTypeField returns the DiscretionaryData field used in WEB and TEL batch files

ProcessControlField getter for TRC Process Control Field characters 1-6 of underlying IndividualName

RDFIIdentificationField get the rdfiIdentification with zero padding

ReceivingCompanyField is used in CCD files but returns the underlying IndividualName field

SHRCardExpirationDateField format MMYY is used in SHR, characters 1-4 of underlying IdentificationNumber

SHRDocumentReferenceNumberField format int is used in SHR, characters 5-15 of underlying IdentificationNumber

SHRIndividualCardAccountNumberField format int is used in SHR, underlying IndividualName

SetCATXAddendaRecords setter for CTX and ATX AddendaRecords characters 1-4 of underlying IndividualName

SetCATXReceivingCompany setter for CTX and ATX ReceivingCompany characters 5-20 underlying IndividualName Position 21-22 of underlying Individual Name are reserved blank space for CTX " "

SetCheckSerialNumber setter for RCK, ARC, BOC CheckSerialNumber which is underlying IdentificationNumber

SetItemResearchNumber setter for TRC Item Research Number characters 7-22 of underlying IndividualName

SetItemTypeIndicator setter for TRC Item Type Indicator which is underlying Discretionary Data

SetOriginalTraceNumber setter for ACK and ATX OriginalTraceNumber which is underlying IdentificationNumber

SetPOPCheckSerialNumber setter for POP CheckSerialNumber which is characters 1-9 of underlying CheckSerialNumber \ IdentificationNumber

SetPOPTerminalCity setter for POP Terminal City which is characters 10-13 of underlying CheckSerialNumber \ IdentificationNumber

SetPOPTerminalState setter for POP Terminal State which is characters 14-15 of underlying CheckSerialNumber \ IdentificationNumber

SetPaymentType as R (Recurring) all other values will result in S (single). This is used for WEB and TEL batch files in-place of DiscretionaryData.

SetProcessControlField setter for TRC Process Control Field characters 1-6 of underlying IndividualName

SetRDFI takes the 9 digit RDFI account number and separates it for RDFIIdentification and CheckDigit

SetReceivingCompany setter for CCD ReceivingCompany which is underlying IndividualName

SetSHRCardExpirationDate format MMYY is used in SHR, characters 1-4 of underlying IdentificationNumber

SetSHRDocumentReferenceNumber format int is used in SHR, characters 5-15 of underlying IdentificationNumber

SetSHRIndividualCardAccountNumber format int is used in SHR, underlying IndividualName

SetTraceNumber takes first 8 digits of ODFI and concatenates a sequence number onto the TraceNumber

SetValidation stores ValidateOpts on the EntryDetail which are to be used to override the default NACHA validation rules.

String writes the EntryDetail struct to a 94 character string.

TraceNumberField returns a zero padded TraceNumber string

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

type ErrBatchAddendaCount struct {
	Message      string
	FoundCount   int
	AllowedCount int
}

ErrBatchAddendaCount is the error given when there are too many addenda than allowed for the batch type

NewErrBatchAddendaCount creates a new error of the ErrBatchAddendaCount type

type ErrBatchAddendaTraceNumber struct {
	Message           string
	EntryDetailNumber string
	TraceNumber       string
}

ErrBatchAddendaTraceNumber is the error given when the entry detail sequence number doesn't match the trace number

NewErrBatchAddendaTraceNumber creates a new error of the ErrBatchAddendaTraceNumber type

type ErrBatchAmount struct {
	Message string
	Amount  int
	Limit   int
}

ErrBatchAmount is the error given when the amount exceeds the batch type's limit

NewErrBatchAmount creates a new error of the ErrBatchAmount type

type ErrBatchAscending struct {
	Message       string
	PreviousTrace interface{}
	CurrentTrace  interface{}
}

ErrBatchAscending is the error given when the trace numbers in a batch are not in ascending order

NewErrBatchAscending creates a new error of the ErrBatchAscending type

type ErrBatchCalculatedControlEquality struct {
	Message         string
	CalculatedValue interface{}
	ControlValue    interface{}
}

ErrBatchCalculatedControlEquality is the error given when the control record does not match the calculated value

NewErrBatchCalculatedControlEquality creates a new error of the ErrBatchCalculatedControlEquality type

ErrBatchCategory is the error given when a batch has entires with two different categories

NewErrBatchCategory creates a new error of the ErrBatchCategory type

type ErrBatchExpectedAddendaCount struct {
	Message       string
	FoundCount    int
	ExpectedCount int
}

ErrBatchExpectedAddendaCount is the error given when the batch type has entries with a field for the number of addenda, and a different number of addenda are foound

NewErrBatchExpectedAddendaCount creates a new error of the ErrBatchExpectedAddendaCount type

type ErrBatchHeaderControlEquality struct {
}

ErrBatchHeaderControlEquality is the error given when the control record does not match the calculated value

NewErrBatchHeaderControlEquality creates a new error of the ErrBatchHeaderControlEquality type

type ErrBatchIATNOC struct {
	Message  string
	Found    interface{}
	Expected interface{}
}

ErrBatchIATNOC is the error given when an IAT batch has an NOC, and there are invalid values

NewErrBatchIATNOC creates a new error of the ErrBatchIATNOC type

type ErrBatchRequiredAddendaCount struct {
	Message       string
	FoundCount    int
	RequiredCount int
}

ErrBatchRequiredAddendaCount is the error given when the batch type requires a certain number of addenda, which is not met

NewErrBatchRequiredAddendaCount creates a new error of the ErrBatchRequiredAddendaCount type

type ErrBatchServiceClassTranCode struct {
	Message          string
	ServiceClassCode int
	TransactionCode  int
}

ErrBatchServiceClassTranCode is the error given when the transaction code is not valid for the batch's service class

NewErrBatchServiceClassTranCode creates a new error of the ErrBatchServiceClassTranCode type

ErrBatchTraceNumberNotODFI is the error given when a batch's ODFI does not match an entry's trace number

NewErrBatchTraceNumberNotODFI creates a new error of the ErrBatchTraceNumberNotODFI type

type ErrFileBatchNumberAscending struct {
	Message       string
	PreviousBatch int
	CurrentBatch  int
}

ErrFileBatchNumberAscending is the error given when the batch numbers in a file are not in ascending order

NewErrFileBatchNumberAscending creates a new error of the ErrFileBatchNumberAscending type

type ErrFileCalculatedControlEquality struct {
	Message         string
	Field           string
	CalculatedValue int
	ControlValue    int
}

ErrFileCalculatedControlEquality is the error given when the control record does not match the calculated value

NewErrFileCalculatedControlEquality creates a new error of the ErrFileCalculatedControlEquality type

ErrFileUnknownSEC is the error given when a record does not have a known type

NewErrFileUnknownSEC creates a new error of the ErrFileUnknownSEC type

type ErrRecordType struct {
	Message      string
	ExpectedType int
}

ErrRecordType is the error given when the field does not have the right record type

NewErrRecordType creates a new error of the ErrRecordType type

type ErrUnknownRecordType struct {
	Message string
	Type    string
}

ErrUnknownRecordType is the error given when a record does not have a known type

NewErrUnknownRecordType creates a new error of the ErrUnknownRecordType type

type ErrValidCheckDigit struct {
	Message              string
	CalculatedCheckDigit int
}

ErrValidCheckDigit is the error given when the observed check digit does not match the calculated one

NewErrValidCheckDigit creates a new error of the ErrValidCheckDigit type

type ErrValidFieldLength struct {
	Message        string
	ExpectedLength int
}

ErrValidFieldLength is the error given when the field does not have the correct length

NewErrValidFieldLength creates a new error of the ErrValidFieldLength type

FieldError is returned for errors at a field level in a record

Error message is constructed FieldName Msg Value Example1: BatchCount $% has none alphanumeric characters Example2: BatchCount 5 is out-of-balance with file count 6

Unwrap implements the base.UnwrappableError interface for FieldError

type File struct {
	
	ID string `json:"id"`

	Batches    []Batcher      `json:"batches"`
	IATBatches []IATBatch     `json:"IATBatches"`
	Control    FileControl    `json:"fileControl"`
	ADVControl ADVFileControl `json:"fileADVControl"`

	
	NotificationOfChange []Batcher `json:"NotificationOfChange"`

	
	ReturnEntries []Batcher `json:"ReturnEntries"`
	
}

File contains the structures of a parsed ACH File.

FileFromJSON attempts to return a *File object assuming the input is valid JSON.

Callers should always check for a nil-error before using the returned file.

The File returned may not be valid and an error may be returned from validation. Invalid files may be rejected by Financial Institutions or ACH tools.

Date and Time fields in formats: RFC 3339 and ISO 8601 will be parsed and rewritten as their YYMMDD (year, month, day) or hhmm (hour, minute) formats.

FileFromJSONWith attempts to return a *File object assuming the input is valid JSON.

It allows custom validation overrides, so the file may not be Nacha compliant after parsing. Invalid files may be rejected by Financial Institutions or ACH tools.

Callers should always check for a nil-error before using the returned file.

Date and Time fields in formats: RFC 3339 and ISO 8601 will be parsed and rewritten as their YYMMDD (year, month, day) or hhmm (hour, minute) formats.

Flatten returns a flattened version of a File, where batches with similar batch headers are consolidated.

Two batches are eligible to be combined if:

MergeDir will consolidate a directory of ACH files into as few files as possible. This is useful for optimizing cost and network utilization.

This operation will override batch numbers in each file to ensure they do not collide. The ascending batch numbers will start at 1.

Entries with duplicate TraceNumbers are allowed in the same file, but must be in separate batches and are automatically separated.

ADV and IAT Batches and Entries are currently not merged together.

MergeDir is typically more performant than MergeFiles as it reads files concurrently while merging occurs. This has a more stable cpu and memory usage trend over reading all files into memory and then calling MergeFiles.

File Batches can only be merged if they are unique and routed to and from the same ABA routing numbers.

MergeFiles is a helper function for consolidating an array of ACH Files into as few files as possible. This is useful for optimizing cost and network utilization.

This operation will override batch numbers in each file to ensure they do not collide. The ascending batch numbers will start at 1.

Entries with duplicate TraceNumbers are allowed in the same file, but must be in separate batches and are automatically separated.

ADV and IAT Batches and Entries are currently not merged together.

Old rules limit files to 10,000 lines (when rendered in their ASCII encoding), which is the default for this function. Use MergeFilesWith for a higher limit.

File Batches can only be merged if they are unique and routed to and from the same ABA routing numbers.

MergeFilesWith is a function for consolidating an array of ACH Files into a few files as possible. This is useful for optimizing cost and network utilization.

This operation will override batch numbers in each file to ensure they do not collide. The ascending batch numbers will start at 1.

Entries with duplicate TraceNumbers are allowed in the same file, but must be in separate batches and are automatically separated.

ADV and IAT Batches and Entries are currently not merged together.

Conditions allows for capping the maximum line length or dollar amount of merged files.

File Batches can only be merged if they are unique and routed to and from the same ABA routing numbers.

NewFile constructs a file template.

ReadDir will attempt to parse all ACH files in the given directory. Only files which parse successfully will be returned.

ReadFile attempts to open a file at path and read the contents before closing and returning the parsed ACH File.

ReadFiles attempts to open files at the given paths and read the contents of each before closing and returning the parsed ACH Files.

ReadJSONFile will consume the specified filepath and parse the contents as a JSON formatted ACH file.

ReadJSONFileWith will consume the specified filepath and parse the contents as a JSON formatted ACH file with custom ValidateOpts.

AddBatch appends a Batch to the ach.File

AddIATBatch appends a IATBatch to the ach.File

Create will modify the File to tabulate and assemble it into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create requires a FileHeader and at least one Batch if validateOpts.AllowZeroBatches is false.

Since each Batch may modify computable fields in the File, any calls to Batch.Create should be done before Create.

To check if the File is Nacha compliant, call Validate or ValidateWith.

FlattenBatches flattens the file's batches by consolidating batches with the same BatchHeader data into one Batch. Entries within each flattened batch will be sorted by their TraceNumber field.

IsADV determines if the File is a File containing ADV batches

MarshalJSON will produce a JSON blob with the ACH file's fields and validation settings.

RemoveBatch will delete a given Batcher from an ach.File

Reversal will transform a File into a Nacha compliant reversal which can be transmitted to undo fund movement.

SegmentFile takes a valid ACH File and returns 2 segmented ACH Files, one ACH File containing credit entries and one ACH File containing debit entries. The return is 2 Files a Credit File and Debit File, or an error.

Callers should always check for a nil-error before using the returned file.

The File returned may not be valid and callers should confirm with Validate. Invalid files may be rejected by other Financial Institutions or ACH tools.

SetHeader allows for header to be built.

SetValidation stores ValidateOpts on the File which are to be used to override the default NACHA validation rules.

UnmarshalJSON parses a JSON blob with ach.FileFromJSON

Validate performs checks on each record according to Nacha guidelines. Validate will never modify the File.

ValidateOpts may be set to bypass certain rules and will only be applied to the FileHeader. The underlying Batches and Entries on this File will use their own ValidateOpts if they are set.

The first error encountered is returned.

ValidateWith performs checks on each record according to Nacha guidelines. ValidateWith will never modify the File.

ValidateOpts may be set to bypass certain rules and will only be applied to the FileHeader. opts passed in will override ValidateOpts set by SetValidation. The underlying Batches and Entries on this File will use their own ValidateOpts if they are set.

The first error encountered is returned.

DefaultFileAcceptor is the default logic for which file extensions to merge and how to read them.

Nacha Format: "" (blank), .ach, and .txt
 JSON Format: ".json"

Files with extensions that do not match are skipped.

type FileControl struct {
	
	ID string `json:"id"`
	
	BatchCount int `json:"batchCount"`
	
	
	BlockCount int `json:"blockCount"`
	
	
	EntryAddendaCount int `json:"entryAddendaCount"`
	
	EntryHash int `json:"entryHash"`
	
	TotalDebitEntryDollarAmountInFile int `json:"totalDebit"`
	
	TotalCreditEntryDollarAmountInFile int `json:"totalCredit"`
	
	Reserved string `json:"reserved"`
	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

FileControl record contains entry counts, dollar totals and hash totals accumulated from each batch control record in the file.

NewFileControl returns a new FileControl with default values for none exported fields

BatchCountField gets a string of the batch count zero padded

BlockCountField gets a string of the block count zero padded

func (v *FileControl) CalculateCheckDigit(routingNumber string) int

EntryAddendaCountField gets a string of entry addenda batch count zero padded

EntryHashField gets a string of entry hash zero padded

Parse takes the input record string and parses the FileControl values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

String writes the FileControl struct to a 94 character string.

TotalCreditEntryDollarAmountInFileField get a zero padded Total credit Entry Amount

TotalDebitEntryDollarAmountInFileField get a zero padded Total debit Entry Amount

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

FileError is an error describing issues validating a file

type FileHeader struct {
	ID string `json:"id"`

	
	
	
	
	
	ImmediateDestination string `json:"immediateDestination"`

	
	
	
	
	
	ImmediateOrigin string `json:"immediateOrigin"`

	
	
	
	
	FileCreationDate string `json:"fileCreationDate"`

	
	
	FileCreationTime string `json:"fileCreationTime"`

	
	
	
	FileIDModifier string `json:"fileIDModifier,omitempty"`

	
	FormatCode string

	
	ImmediateDestinationName string `json:"immediateDestinationName"`

	
	ImmediateOriginName string `json:"immediateOriginName"`

	ReferenceCode string `json:"referenceCode,omitempty"`

	LineNumber int `json:"lineNumber,omitempty"`
	
}

FileHeader is a Record designating physical file characteristics and identify the origin (sending point) and destination (receiving point) of the entries contained in the file. The file header also includes creation date and time fields which can be used to uniquely identify a file.

NewFileHeader returns a new FileHeader with default values for none exported fields

func (v *FileHeader) CalculateCheckDigit(routingNumber string) int

FileCreationDateField gets the file creation date in YYMMDD (year, month, day) format A blank string is returned when an error occurred while parsing the timestamp. ISO 8601 is the only other format supported.

FileCreationTimeField gets the file creation time in HHmm (hour, minute) format A blank string is returned when an error occurred while parsing the timestamp. ISO 8601 is the only other format supported.

ImmediateDestinationField gets the immediate destination number with zero padding

ImmediateDestinationNameField gets the ImmediateDestinationName field padded

ImmediateOriginField gets the immediate origin number with 0 padding

ImmediateOriginNameField gets the ImmImmediateOriginName field padded

Parse takes the input record string and parses the FileHeader values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

ReferenceCodeField gets the ReferenceCode field padded

SetValidation stores ValidateOpts on the FileHeader which are to be used to override the default NACHA validation rules.

String writes the FileHeader struct to a 94 character string.

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops the parsing.

ValidateWith performs NACHA format rule checks on each record according to their specification overlayed with any custom flags. The first error encountered is returned and stops the parsing.

IATBatch holds the Batch Header and Batch Control and all Entry Records for an IAT batch

An IAT entry is a credit or debit ACH entry that is part of a payment transaction involving a financial agency's office (i.e., depository financial institution or business issuing money orders) that is not located in the territorial jurisdiction of the United States. IAT entries can be made to or from a corporate or consumer account and must be accompanied by seven (7) mandatory addenda records identifying the name and physical address of the Originator, name and physical address of the Receiver, Receiver's account number, Receiver's bank identity and reason for the payment.

NewIATBatch takes a BatchHeader and returns a matching SEC code batch type that is a batcher. Returns an error if the SEC code is not supported.

AddEntry appends an EntryDetail to the Batch

Category returns IATBatch Category

Create will tabulate and assemble an ACH batch into a valid state. This includes setting any posting dates, sequence numbers, counts, and sums.

Create implementations are free to modify computable fields in a file and should call the Batch's Validate function at the end of their execution.

DeleteEntries deletes all Entries from the Batch where del() == true

error returns a new BatchError based on err

GetControl returns the current Batch Control

GetEntries returns a slice of entry details for the batch

GetHeader returns the current Batch header

SetControl appends an BatchControl to the Batch

SetHeader appends an BatchHeader to the Batch

SetValidation stores ValidateOpts on the Batch which are to be used to override the default NACHA validation rules.

UnmarshalJSON un-marshals JSON IATBatch

Validate checks properties of the ACH batch to ensure they match NACHA guidelines. This includes computing checksums, totals, and sequence orderings.

Validate will never modify the iatBatch.

type IATBatchHeader struct {
	ID string `json:"id"`

	
	
	ServiceClassCode int `json:"serviceClassCode"`

	IATIndicator string `json:"IATIndicator,omitempty"`

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	ForeignExchangeIndicator string `json:"foreignExchangeIndicator"`

	
	
	
	
	
	ForeignExchangeReferenceIndicator int `json:"foreignExchangeReferenceIndicator"`

	
	
	ForeignExchangeReference string `json:"foreignExchangeReference"`

	
	
	
	ISODestinationCountryCode string `json:"ISODestinationCountryCode"`

	
	
	
	OriginatorIdentification string `json:"originatorIdentification"`

	
	
	
	
	
	
	
	StandardEntryClassCode string `json:"standardEntryClassCode"`

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	CompanyEntryDescription string `json:"companyEntryDescription,omitempty"`

	
	
	
	
	ISOOriginatingCurrencyCode string `json:"ISOOriginatingCurrencyCode"`

	
	
	
	
	ISODestinationCurrencyCode string `json:"ISODestinationCurrencyCode"`

	EffectiveEntryDate string `json:"effectiveEntryDate,omitempty"`

	SettlementDate string `json:"settlementDate,omitempty"`

	
	
	
	OriginatorStatusCode int `json:"originatorStatusCode,omitempty"`

	
	
	
	
	ODFIIdentification string `json:"ODFIIdentification"`

	
	
	
	
	BatchNumber int `json:"batchNumber"`

	LineNumber int `json:"lineNumber,omitempty"`
	
}

IATBatchHeader identifies the originating entity and the type of transactions contained in the batch for SEC Code IAT. This record also contains the effective date, or desired settlement date, for all entries contained in this batch. The settlement date field is not entered as it is determined by the ACH operator.

An IAT entry is a credit or debit ACH entry that is part of a payment transaction involving a financial agency's office (i.e., depository financial institution or business issuing money orders) that is not located in the territorial jurisdiction of the United States. IAT entries can be made to or from a corporate or consumer account and must be accompanied by seven (7) mandatory addenda records identifying the name and physical address of the Originator, name and physical address of the Receiver, Receiver's account number, Receiver's bank identity and reason for the payment.

NewIATBatchHeader returns a new BatchHeader with default values for non exported fields

BatchNumberField get the batch number zero padded

func (v *IATBatchHeader) CalculateCheckDigit(routingNumber string) int

CompanyEntryDescriptionField gets the CompanyEntryDescription left padded

EffectiveEntryDateField get the EffectiveEntryDate in YYMMDD format

ForeignExchangeIndicatorField gets the ForeignExchangeIndicator

ForeignExchangeReferenceField gets the ForeignExchangeReference left padded

ForeignExchangeReferenceIndicatorField gets the ForeignExchangeReferenceIndicator

IATIndicatorField gets the IATIndicator left padded

ISODestinationCountryCodeField gets the ISODestinationCountryCode

ISODestinationCurrencyCodeField gets the ISODestinationCurrencyCode

ISOOriginatingCurrencyCodeField gets the ISOOriginatingCurrencyCode

ODFIIdentificationField get the odfi number zero padded

OriginatorIdentificationField gets the OriginatorIdentification left padded

Parse takes the input record string and parses the BatchHeader values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

SettlementDateField gets the SettlementDate

String writes the BatchHeader struct to a 94 character string.

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

type IATEntryDetail struct {
	
	ID string `json:"id"`
	
	
	
	
	
	
	
	
	
	TransactionCode int `json:"transactionCode"`
	
	
	RDFIIdentification string `json:"RDFIIdentification"`
	
	CheckDigit string `json:"checkDigit"`
	
	AddendaRecords int `json:"addendaRecords"`
	
	Amount int `json:"amount"`
	
	
	DFIAccountNumber string `json:"DFIAccountNumber"`
	
	OFACScreeningIndicator string `json:"OFACScreeningIndicator"`
	
	SecondaryOFACScreeningIndicator string `json:"secondaryOFACScreeningIndicator"`
	
	
	
	AddendaRecordIndicator int `json:"addendaRecordIndicator"`
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	TraceNumber string `json:"traceNumber,omitempty"`
	
	
	
	
	Addenda10 *Addenda10 `json:"addenda10"`
	
	
	
	
	Addenda11 *Addenda11 `json:"addenda11"`
	
	
	
	
	Addenda12 *Addenda12 `json:"addenda12"`
	
	
	
	
	
	
	Addenda13 *Addenda13 `json:"addenda13"`
	
	
	
	Addenda14 *Addenda14 `json:"addenda14"`
	
	
	
	Addenda15 *Addenda15 `json:"addenda15"`
	
	
	
	Addenda16 *Addenda16 `json:"addenda16"`
	
	
	
	
	Addenda17 []*Addenda17 `json:"addenda17,omitempty"`
	
	
	
	
	
	Addenda18 []*Addenda18 `json:"addenda18,omitempty"`
	
	Addenda98 *Addenda98 `json:"addenda98,omitempty"`
	
	Addenda99 *Addenda99 `json:"addenda99,omitempty"`
	
	Category string `json:"category,omitempty"`
	
	LineNumber int `json:"lineNumber,omitempty"`
	
}

IATEntryDetail contains the actual transaction data for an individual entry. Fields include those designating the entry as a deposit (credit) or withdrawal (debit), the transit routing number for the entry recipient's financial institution, the account number (left justify,no zero fill), name, and dollar amount.

NewIATEntryDetail returns a new IATEntryDetail with default values for non exported fields

AddAddenda17 appends an Addenda17 to the IATEntryDetail

AddAddenda18 appends an Addenda18 to the IATEntryDetail

AddendaRecordsField returns a zero padded AddendaRecords string

AmountField returns a zero padded string of amount

func (v *IATEntryDetail) CalculateCheckDigit(routingNumber string) int

DFIAccountNumberField gets the DFIAccountNumber with space padding

OFACScreeningIndicatorField gets the OFACScreeningIndicator

Parse takes the input record string and parses the EntryDetail values

Parse provides no guarantee about all fields being filled in. Callers should make a Validate call to confirm successful parsing and data validity.

RDFIIdentificationField get the rdfiIdentification with zero padding

SecondaryOFACScreeningIndicatorField gets the SecondaryOFACScreeningIndicator

SetRDFI takes the 9 digit RDFI account number and separates it for RDFIIdentification and CheckDigit

SetTraceNumber takes first 8 digits of ODFI and concatenates a sequence number onto the TraceNumber

SetValidation stores ValidateOpts on the EntryDetail which are to be used to override the default NACHA validation rules.

String writes the EntryDetail struct to a 94 character string.

TraceNumberField returns a zero padded TraceNumber string

Validate performs NACHA format rule checks on the record and returns an error if not Validated The first error encountered is returned and stops that parsing.

Iterator is a data structure for processing an ACH file one entry at a time.

NewIterator returns an Iterator

GetControl will return the FileControl once encountered by the iterator. Call NextEntry() at least once to populate the control.

GetHeader will return the FileHeader once encountered by the iterator. Call NextEntry() at least once to populate the header.

NextEntry will return the next available EntryDetail record and the BatchHeader the entry belongs to.

IAT entries are not currently supported.

Merge can merge ACH files with custom ValidateOpts

NewMerger returns a Merge which can have custom ValidateOpts

type Offset struct {
	RoutingNumber string            `json:"routingNumber"`
	AccountNumber string            `json:"accountNumber"`
	AccountType   OffsetAccountType `json:"accountType"`
	Description   string            `json:"description"`
}

Offset contains the associated information to append an 'Offset Record' on an ACH batch during Create.

Reader reads records from an ACH-encoded file.

NewReader returns a new ACH Reader that reads from r.

NewReader returns a new ACH Reader that reads from r with the provided content type.

Read reads each line in the underlying io.Reader and returns a File and any errors encountered.

Read enforces ACH formatting rules and the first character of each line determines which parser is used.

The returned File may not be valid. Callers should tabulate the File with File.Create followed by File.Validate to ensure it is Nacha compliant.

Invalid files may be rejected by other financial institutions or ACH tools.

SetValidation stores ValidateOpts on the Reader's underlying File which are to be used to override the default NACHA validation rules.

type RecordWrongLengthErr struct {
	Message string
	Length  int
}

RecordWrongLengthErr is the error given when a record is the wrong length

NewRecordWrongLengthErr creates a new error of the RecordWrongLengthErr type

type ReturnCode struct {
	Code        string `json:"code"`
	Reason      string `json:"reason"`
	Description string `json:"description"`
}

ReturnCode holds a return Code, Reason/Title, and Description

Table of return codes exists in Part 4.2 of the NACHA corporate rules and guidelines

LookupReturnCode will return a struct representing the reason and description for the provided NACHA return code.

type SegmentFileConfiguration struct{}

SegmentFileConfiguration contains configuration setting for sorting during Segment File Creation.

It is currently not defined, but can/will be expanded later and File.SegmentFile enhanced to use the configuration settings

SegmentFileConfiguration returns a new SegmentFileConfiguration with default values for non exported fields

type ValidateOpts struct {
	
	SkipAll bool `json:"skipAll"`

	
	
	RequireABAOrigin bool `json:"requireABAOrigin"`

	
	
	
	
	
	BypassOriginValidation bool `json:"bypassOriginValidation"`

	
	
	
	
	
	BypassDestinationValidation bool `json:"bypassDestinationValidation"`

	
	
	
	CheckTransactionCode func(code int) error `json:"-"`

	
	
	
	
	CustomTraceNumbers bool `json:"customTraceNumbers"`

	
	AllowZeroBatches bool `json:"allowZeroBatches"`

	AllowMissingFileHeader bool `json:"allowMissingFileHeader"`

	
	AllowMissingFileControl bool `json:"allowMissingFileControl"`

	
	
	BypassCompanyIdentificationMatch bool `json:"bypassCompanyIdentificationMatch"`

	
	
	CustomReturnCodes bool `json:"customReturnCodes"`

	
	
	UnequalServiceClassCode bool `json:"unequalServiceClassCode"`

	
	AllowUnorderedBatchNumbers bool `json:"allowUnorderedBatchNumbers"`

	
	
	AllowInvalidCheckDigit bool `json:"allowInvalidCheckDigit"`

	
	UnequalAddendaCounts bool `json:"unequalAddendaCounts"`

	
	PreserveSpaces bool `json:"preserveSpaces"`

	
	AllowInvalidAmounts bool `json:"allowInvalidAmounts"`

	
	AllowZeroEntryAmount bool `json:"allowZeroEntryAmount"`

	
	AllowSpecialCharacters bool `json:"allowSpecialCharacters"`

	
	
	AllowEmptyIndividualName bool `json:"allowEmptyIndividualName"`
}

ValidateOpts contains specific overrides from the default set of validations performed on a NACHA file, records and various fields within.

type WriteOpts struct {
	
	LineEnding string `json:"lineEnding"`
}

WriteOpts defines options for writing a file.

type Writer struct {
	LineEnding string 
	
	BypassValidation bool
	
}

Writer writes a File to an io.Writer. The File is validated against Nacha guidelines unless BypassValidation is enabled.

NewWriter returns a new Writer that writes to w.

NewWriter returns a new Writer that writes to w.

Flush writes any buffered data to the underlying io.Writer.

Writer writes a single ach.file record to w


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4