Skip to content
Alex Schickedanz edited this page Sep 8, 2021 · 16 revisions

Creating a Sephpa object

$creditTransferFile = new SephpaCreditTransfer(
	'<Initiating Party / Name>', 
	'<Message Identification>',
	<ISO 20022 XML Message Version>
);

Parameters

Parameter (optional) Type [Default] Description [Note]
initgPty string Initiating Party / Name
msgId string Message Identification
version int ISO 20022 XML Message Version [1]
orgId array [] Organization Identifier [2]
initgPtyId string [null] Initiating Party ID [3]
checkAndSanitize bool [true] Input Validation [4]

Notes

  1. Only use the SephpaCreditTransfer::SEPA_PAIN_001_* constants.
  2. It is recommended not to use this. If used, the array must have a at least one of the keys:
    • id (an Identifier of the organization)
    • bob (A BIC or BEI that identifies the organization).
      • scheme_name: max. 35 characters.
  3. Only use if you know for what it is for.
  4. You can turn this off if you are confident that your inputs are well formed e.g. if you sanitized them before storing them in your database.

Getting a payment collection

$creditTransferCollection = $creditTransferFile->addCollection([
	'pmtInfId'	=> '<A Unique File Collection ID>',
	'dbtr'		=> '<Debtor Information>',
	'iban'		=> '<IBAN>'
]);

The function addCollection takes an array of key-value pairs.

Available keys

Parameter (optional) Type [Default] Description [Note]
pmtInfId string Payment Information Identification
dbtr string Debtor Information
iban string IBAN
bic string BIC [1]
ccy string [EUR] Currency
btchBookg string Batch Booking
ctgyPurp string Category Purpose [2]
reqdExctnDt string Requested Execution Date [3]
ultmtDbtr string Ultimate Debtor
pstlAdr array Debtor Postal Address [4]

Notes

  1. The BIC is only required for version pain.001.002.03 but not for pain.001.001.03 and pain.001.003.03.
  2. ctgyPurp is supposed to be one out of a list of 4-letter codes.
  3. If requested date is omitted, current processing date is used.
  4. This array supports two keys:
    • ctry (string): Tow-letter country code (upper case).
    • adrLine (string|array): A string or an array of at most two strings.

Adding payments

$creditTransferCollection->addPayment([
	'pmtId'		=> '<Payment Identification>',
	'instdAmt'	=> '<Instructed Amount>',
	'cdtr'		=> '<Creditor Information>',
	'iban'		=> '<IBAN>'
]);

The function addPayment takes an array of key-value pairs.

Available keys

Parameter (optional) Type [Default] Description [Note]
pmtId string Payment Identification
instdAmt float / string Instructed Amount [1]
iban string IBAN
cdtr string Creditor Information
bic string BIC [2]
ultmtCdtr string Ultimate Creditor
purp string Purpose [3]
rmtInf string Remittance Information
ultmtDbtr string Ultimate Debtor
ultmtDbtrId string Ultimate Debtor / Identification
pstlAdr array Creditor Postal Address [4]

Notes

  1. A string must be able to be interpreted as a float. One is allowed to use both , and . as decimal point.
  2. The BIC is only required for version pain.001.002.03 but not for pain.001.001.03 and pain.001.003.03.
  3. purp is supposed to be one out of a list of 4-letter codes.
  4. This array supports two keys:
    • ctry (string): Tow-letter country code (upper case).
    • adrLine (string|array): A string or an array of at most two strings.
Clone this wiki locally