sepa_sctinst package

sepa_sctinst.default_messages module

class sepa_sctinst.default_messages.DefaultMessages

Bases: object

All sepa_sctinst.message.Message objects available on the SCTInst scheme (Interbank and C2B)

NEGATIVE_STATUS = <sepa_sctinst.message.Message object>
POSITIVE_STATUS = <sepa_sctinst.message.Message object>
RECALL = <sepa_sctinst.message.Message object>
RECALL_NEG = <sepa_sctinst.message.Message object>
RECALL_POS = <sepa_sctinst.message.Message object>
RECALL_STATUS_INV = <sepa_sctinst.message.Message object>
RFRO = <sepa_sctinst.message.Message object>
RFRO_NEG = <sepa_sctinst.message.Message object>
RFRO_POS = <sepa_sctinst.message.Message object>
RFRO_STATUS_INV = <sepa_sctinst.message.Message object>
SCTINST_C2B = <sepa_sctinst.message.Message object>
SCTINST_C2B_BACK = <sepa_sctinst.message.Message object>
SCTINST_C2B_STATUS = <sepa_sctinst.message.Message object>
SCTINST_INTERBANK = <sepa_sctinst.message.Message object>
SCTINST_STATUS_INV = <sepa_sctinst.message.Message object>

sepa_sctinst.message module

class sepa_sctinst.message.Message(code: str, xsd_filepath: str, xmlns: str, fn_msg_id=None, fn_tx_id=None)

Bases: object

A class to describe message configuration.

A message object provide all characteristics needed to validate a xml message.

static autodetect(data)

Return the sepa_sctinst.message.Message object associated to the data parameter by matching with the xmlns attribute

code: str

Code is a mnemonic value for a specific message

fn_msg_id: str

Message ID generator function

fn_tx_id: str

Transaction ID generator function

static gen_message_id()

Generate a message ID

static gen_tx_id()

Generate a transaction ID

xmlns: str

XML namespace

xsd_filepath: str

Relative path to the XSD file

sepa_sctinst.schema_validation module

class sepa_sctinst.schema_validation.SchemaValidation

Bases: object

A class to validate SCTInst messages

This object provide a schema validation method

static validate(data: str, message: sepa_sctinst.message.Message)

XSD Validation for SCTInst messages where data is a XML message as string, message is an sepa_sctinst.message.Message wich provide the schema to use for validation

Return: A dict with isValid key and error_messages key if isValid = False

sepa_sctinst.participant module

class sepa_sctinst.participant.Participant(bic: str, iban: str, name: str)

Bases: object

A class to represent a participant in interbank SCTInst message

bic: str

The BIC code of the participant Bank

iban: str

The IBAN of the account

name: str

The name of the account

static to_xml(payment, transaction_node: _elementtree.SubElement, transaction, stakeholder: str)

sepa_sctinst.sct_inst_interbank module

class sepa_sctinst.sct_inst_interbank.GroupHeader(message_identification: str, creation_datetime: datetime.datetime, interbank_sttlmt_date: datetime.date, sttlmt_method: str)

Bases: object

A class to represent the group header in interbank SCTInst message

Set of characteristics shared by all individual transactions included in the message.

creation_datetime: datetime.datetime

Date and time at which the message was created.

interbank_sttlmt_date: datetime.date

Date on which the amount of money ceases to be available to the agent that owes it and when the amount of money becomes available to the agent to which it is due.

message_identification: str

Message Identification assigned by the instructing party, and sent to the next party in the chain to unambiguously identify the message.

sttlmt_method: str

Method used to settle the (batch of) payment instructions.Only CLRG, INGA and INDA are allowed

class sepa_sctinst.sct_inst_interbank.SCTInst(group_header: sepa_sctinst.sct_inst_interbank.GroupHeader, originator: sepa_sctinst.participant.Participant, transaction: sepa_sctinst.sct_inst_interbank.Transaction)

Bases: object

A class to represent a SCTInst interbank message

group_header: sepa_sctinst.sct_inst_interbank.GroupHeader

sepa_sctinst.sct_inst.GroupHeader object shared by all individual transactions included in the message.

originator: sepa_sctinst.participant.Participant

Originator sepa_sctinst.participant.Participant object that initiates the payment.

static random()

Generate random SCTInst object

Returns sepa_sctinst.sct_inst_interbank.SCTInst object with random value

to_xml()

Generate message as XML Document Returns a string as XML dcoument

transaction: sepa_sctinst.sct_inst_interbank.Transaction

sepa_sctinst.sct_inst.Transaction object give information about the transaction.

xml_header(root_fito)
xml_transaction(root_fito)
class sepa_sctinst.sct_inst_interbank.Transaction(beneficiary: sepa_sctinst.participant.Participant, amount: float, end_to_end_id: str, tx_id: str, acceptance_datetime: datetime.datetime, reference: str, remittance_information: str)

Bases: object

A class to represent a transaction in interbank SCTInst message

acceptance_datetime: datetime.datetime

Point in time when the payment order from the initiating party meets the processing conditions of the account servicing agent.

amount: float

The amount of the SCT Inst in Euro

beneficiary: sepa_sctinst.participant.Participant

Beneficiary informations as sepa_sctinst.participant.Participant

end_to_end_id: str

Original End To End Identification. Unique identification, as assigned by the original initiating party

reference: str

Reference information provided by the creditor to allow the identification of the underlying documents.

remittance_information: str

Remittance information

tx_id: str

Original Transaction Identification. Unique identification, as assigned by the original first instructing agent

sepa_sctinst.sct_inst_c2b module

class sepa_sctinst.sct_inst_c2b.GroupHeader(message_identification: str, creation_datetime: datetime.datetime, init_party_name: str)

Bases: object

A class to represent a group header in C2B SCTInst message Set of characteristics shared by all individual transactions included in the message.

creation_datetime: datetime.datetime

Date and time at which the message was created.

init_party_name: str

Name by which a party is known and which is usually used to identify that party.

message_identification: str

Message Identification assigned by the instructing party, and sent to the next party in the chain to unambiguously identify the message.

class sepa_sctinst.sct_inst_c2b.PaymentInformation(payment_id: str, batch_booking: bool, requ_exe_date: datetime.date)

Bases: object

A class to represent a payment information in C2B SCTInst message

batch_booking: bool

Identifies whether a single entry per individual transaction or a batch entry for the sum of the amounts of all transactions within the group of a message is requested.

payment_id: str

Unique identification, as assigned by a sending party, to unambiguously identify the payment information group within the message.

requ_exe_date: datetime.date

Date at which the initiating party requests the clearing agent to process the payment.

class sepa_sctinst.sct_inst_c2b.SCTInstC2B(group_header: sepa_sctinst.sct_inst_c2b.GroupHeader, originator: sepa_sctinst.participant.Participant, payment_information: sepa_sctinst.sct_inst_c2b.PaymentInformation, transactions: list, message_configuration: sepa_sctinst.message.Message = <sepa_sctinst.message.Message object>)

Bases: sepa_sctinst.message.Message

A class to represent a SCTInst C2B message

add_transaction(transaction)
group_header: sepa_sctinst.sct_inst_c2b.GroupHeader

sepa_sctinst.sct_inst_c2b.GroupHeader object shared by all individual transactions included in the message.

originator: sepa_sctinst.participant.Participant

Originator sepa_sctinst.participant.Participant object that initiates the payment.

payment_information: sepa_sctinst.sct_inst_c2b.PaymentInformation

sepa_sctinst.sct_inst_c2b.PaymentInformation object shared characteristics that applies to the debit side of the payment transactions.

static random(nb_txs)

Generate random SCTInstC2B object

Returns:

SCTInstC2B: SCTInstC2B object with random value

sum_amounts()
to_interbank(sttlmt_method)
to_xml()

Generate message as XML Document Returns a string as XML dcoument

transactions: list

List of all sepa_sctinst.sct_inst_c2b.Transaction

xml_header(root_fito)
xml_payment_information(root_fito)
xml_transaction(root_fito, transaction)
class sepa_sctinst.sct_inst_c2b.Transaction(beneficiary: sepa_sctinst.participant.Participant, amount: float, end_to_end_id: str, remittance_information: str)

Bases: object

A class to represent a transaction in C2B SCTInst message

amount: float

The amount of the SCT Inst in Euro

beneficiary: sepa_sctinst.participant.Participant

Beneficiary informations as sepa_sctinst.participant.Participant

end_to_end_id: str

Unique identification assigned by the initiating party to unumbiguously identify the transaction.

remittance_information: str

Information supplied to enable the matching of an entry with the items that the transfer is intended to settle, such as commercial invoices in an accounts’ receivable system.