Python SEPA XML implementations
Project description
This is a python implementation to generate SEPA XML files.
Limitations
Supported standards:
SEPA PAIN.001.001.03
SEPA PAIN.008.001.02
SEPA PAIN.008.002.02
SEPA PAIN.008.003.02
Usage
Direct debit
Example:
from sepaxml import SepaDD
import datetime, uuid
config = {
"name": "Test von Testenstein",
"IBAN": "NL50BANK1234567890",
"BIC": "BANKNL2A",
"batch": True,
"creditor_id": "DE26ZZZ00000000000", # supplied by your bank or financial authority
"currency": "EUR", # ISO 4217
# "instrument": "B2B" # - default is CORE (B2C)
}
sepa = SepaDD(config, schema="pain.008.002.02", clean=True)
payment = {
"name": "Test von Testenstein",
"IBAN": "NL50BANK1234567890",
"BIC": "BANKNL2A",
"amount": 5000, # in cents
"type": "RCUR", # FRST,RCUR,OOFF,FNAL
"collection_date": datetime.date.today(),
"mandate_id": "1234",
"mandate_date": datetime.date.today(),
"description": "Test transaction",
# "endtoend_id": str(uuid.uuid1()) # autogenerated if obmitted
}
sepa.add_payment(payment)
print(sepa.export(valudate=True))
Credit transfer
Example:
from sepaxml import SepaTransfer
import datetime, uuid
config = {
"name": "Test von Testenstein",
"IBAN": "NL50BANK1234567890",
"BIC": "BANKNL2A",
"batch": True,
"currency": "EUR", # ISO 4217
}
sepa = SepaTransfer(config, clean=True)
payment = {
"name": "Test von Testenstein",
"IBAN": "NL50BANK1234567890",
"BIC": "BANKNL2A",
"amount": 5000, # in cents
"execution_date": datetime.date.today(),
"description": "Test transaction",
# "endtoend_id": str(uuid.uuid1()) # optional
}
sepa.add_payment(payment)
print(sepa.export(validate=True))
Development
To run the included tests:
pip install -r requirements_dev.txt py.test tests
To automatically sort your Imports as required by CI:
pip install isort isort -rc .
Credits and License
Maintainer: Raphael Michel <mail@raphaelmichel.de>
This basically started as a properly packaged, python 3 tested version of the PySepaDD implementation that was released by The Congressus under the MIT license. Thanks for your work!
License: MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sepaxml-2.2.0.tar.gz
(23.8 kB
view details)
Built Distribution
sepaxml-2.2.0-py3-none-any.whl
(30.4 kB
view details)
File details
Details for the file sepaxml-2.2.0.tar.gz
.
File metadata
- Download URL: sepaxml-2.2.0.tar.gz
- Upload date:
- Size: 23.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51059d72977ac6c3e4b9834cc631842e531b332b3429e65c96b42ac1673a7677 |
|
MD5 | 8145227c416c493164bff45d20e31044 |
|
BLAKE2b-256 | 9107adf731ebe2c6317e7d96dcd5941a42f2cc7aac0d59a16be7e039f7da9df2 |
File details
Details for the file sepaxml-2.2.0-py3-none-any.whl
.
File metadata
- Download URL: sepaxml-2.2.0-py3-none-any.whl
- Upload date:
- Size: 30.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be383d042239fba1aa05b49df0dd678bdfe673060c0aa09bb56a40a656a1604b |
|
MD5 | c0adb2760faf6ffa4a066a092a005181 |
|
BLAKE2b-256 | f093e2f771f2af50ff46cf0ae2a794cc3ae28d1c21937bd5e7c4790abbf0904f |