Skip to main content

ACHCreditPaymentInitiation

If you want to learn more about ACH (Automated Clearing House), please refer to the Official NACHA website.
The ACHCreditPaymentInitiation class is used to generate ACH Credit Payment Initiation messages. These are primarily used for electronic funds transfers within the United States banking system. It can be created via the ACHCreditPaymentInitiationConfig interface.

Constructor

Initializes a new ACHCreditPaymentInitiation instance with the provided configuration.

Methods

serialize(): string

Serializes the ACHCreditPaymentInitiation instance into an XML string representation. The resulting XML string can be used to send the payment to the bank.

toString(): string

Alias for serialize().

static fromXML(rawXml: string): ACHCreditPaymentInitiation

Creates a new ACHCreditPaymentInitiation instance from an XML string.

Validation

The class includes built-in validation to ensure the payment initiation data meets the required standards:
  • Message ID must not exceed 35 characters.
  • All payment instructions must have USD as the currency.
  • Amount values should be specified in cents (e.g., 100000 for $1000.00).
  • ABA routing numbers must be valid and properly formatted.
  • Account numbers must be valid for US banking.