Web App used to send Chilean SII DTE documents
This software **has yet to pass SII certification**, it's currently in developpment. Its main goal is to understand how SII works and how to communicate with it in a clear way. The project is currently published under **MIT License** so feel free to copy, modify, and contribute.Current state allows you to : - Generate PDF with correct format for document type 52 - Generate PDF from DTE XML (documenty type 52 only) - Get a token from SII - Parse CAF document - Convert your PFX file to SII expected format using OpenSSL - Prepare a ready-to-upload XML
pip3 install -r requirements.txt
-
Basic Web UI (Flask):
python3 run.py
- First "login" with your RUT (this is just a mean to initiate session, no authentication) - Then load your certiciate and password - Now you can get a token (useless right now, just to check if your certificate is registered in SII) or generate a test PDF
-
get_token <pfx_file_path> <pfx_password>
python3 run.py get_token '/home/user/Desktop/cert/my-cert.pfx' Password
ResultSeed : 024945556814 Token : AF6X9CCA6F9Z9
-
generate_cert <pfx_file_path> <pfx_password>
python3 run.py generate_cert '/home/user/Desktop/cert/my-cert.pfx' Password
ResultNo output, key loaded in memory (useless at this stage...)
-
generate_pdf
python3 run.py generate_pdf 52
ResultPDF file output in temp directory
- generate_pdf_from_xml <xml_file_path>
Result
python3 run.py generate_pdf_from_xml '/home/user/Desktop/xml/xml-52.pfx'
PDF file output in temp directory
- generate_pdf_from_xml <xml_file_path>
A PDF sample generated using this project is available at "documents/sample_52.pdf"