Payment Initiation (PAIN)
SEPA Credit
SEPA Credit
SEPACreditPaymentInitiation
If want to learn more about SEPA, please refer to the Official SEPA website.
The SEPACreditPaymentInitiation
class is used to generate SEPA Credit Payment v3 Initiation messages (pain.001.001.03). These are primarily used to send cross-border payments.
It can be created via the SEPACreditPaymentInitiationConfig
interface.
Constructor
Initializes a new SEPACreditPaymentInitiation
instance with the provided configuration.
Methods
serialize(): string
Serializes the SEPACreditPaymentInitiation
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:
messageId
should not exceed 35 characters.- All payment instructions must have a consistent currency.
- All creditors must have a complete address (including country).