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")
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())
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)
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())
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.0.0.tar.gz
(9.2 kB
view details)
Built Distribution
sepaxml-2.0.0-py3-none-any.whl
(11.8 kB
view details)
File details
Details for the file sepaxml-2.0.0.tar.gz
.
File metadata
- Download URL: sepaxml-2.0.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc47f864e513908adf35dfa84332aef9e114a9f7b320824be0ca2f0a9443124a |
|
MD5 | 86ad55e5185b944beb4c304bd8b7e41d |
|
BLAKE2b-256 | 0c57eced88674e5479eb8851f0a3a3193aced9b8fc4f4b43b6d48b41493fd293 |
File details
Details for the file sepaxml-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: sepaxml-2.0.0-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2df1cfb6298a6b127949fb3d50ae687b544a8b36af4daf258a56e4c2a2c0456b |
|
MD5 | ea6c5c8b9d47a0e1e4ce568028266598 |
|
BLAKE2b-256 | ca3406387beaf670a4b69dc7b6baf587777cc957f31f24438ba72909304c8263 |