Payment Initiation (PAIN)
RTP Credit
Create a RTP Credit Payment Initiation message
RTPCreditPaymentInitiation
If you want to learn mroe about RTP (U.S. Real-Time Payments), please refer to the Official Clearing House website.
The RTPCreditPaymentInitiation
class is used to generate RTP Credit Payment Initiation messages. These are primarily used for real-time payment transfers within the United States banking system.
It can be created via the RTPCreditPaymentInitiationConfig
interface.
Constructor
Initializes a new RTPCreditPaymentInitiation
instance with the provided configuration.
Methods
serialize(): string
Serializes the RTPCreditPaymentInitiation
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()
.
Validation
The class includes built-in validation to ensure the payment initiation data meets the required standards:
- Account numbers must be valid for US banking.
- ABA routing numbers must be valid and properly formatted.
- All payment instructions must have USD as the currency.
- Amount values should be specified in cents (e.g., 100000 for $1000.00).