- Duration
- 12 days for the core work, then two weeks for the tax details
- Invoicing tests
- 64 tests, up from none
- Result
- Invoices are sent and accepted
From the project

What I found
- The signature was a "stamp" made with a fixed key written in the code, not with a certificate issued by the authority.
- No device was registered, so there was no certificate.
- The invoice hash was taken from a JSON text, not from the invoice file.
- One invoice chain shared by every store, broken by every server restart.
- A first-phase QR code, and every invoice reported, even business invoices that need clearing first.
What I built
- Registration for each store: a one-time code, the certificate request, then the compliance certificate, then the production certificate.
- A real ECDSA signature inside the invoice file, and each store’s private key stored encrypted.
- A hash of the canonical UBL file, and a separate chain per store saved in the database together with the invoice.
- A QR code with the second-phase fields: the hash, the signature and the public key.
- Business invoices cleared before they reach the buyer, simplified invoices reported.
- Three retries when the platform does not answer, a periodic sweep of pending invoices, a status board, and a check that recomputes the whole chain.
How I checked
64 invoicing tests where there were none, among them one that checks a store's chain never leaks into another: I wrote it before the fix, it failed on the old code, then passed. After registration and the production certificate, the invoices were sent and accepted.
After the core work, two weeks for the tax details: a category on each line (standard, zero-rated, exempt) instead of one fixed rate, and invoices kept for 6 years with proof they were not changed.
Built with
PythonUBL 2.1ECDSA (secp256k1)XAdESAES-256-GCM
Services in this work
- Point-of-sale systemsA point of sale for your shop or every branch: it keeps selling when the internet drops, works with card terminals and receipt printers, keeps track of stock, and gives you one view of every branch.
- Maintaining an existing systemYour system runs but keeps breaking, the bills keep growing and you do not know why, or the person who built it is gone? I take over your existing app or system, find the root cause, fix it, and carry on with you.
Related work
- An AI assistant for a law firmA law firm in Saudi Arabia has a platform with a public assistant on its site, a client portal and an AI hub for its lawyers. It worked, but the AI bill grew every month beyond what the firm expected. I found where it went, and cut it by 83%.
- AMRONECAn engineering and industrial company in Saudi Arabia. I built its website in Arabic and English with a hub of engineering tools, and I am building its ERP in phases, covering accounts, sales, contracts and billing.
- Our own productA3malakA platform of our own for shops that sell on WhatsApp: your whole team on one number, the order and the payment link from inside the chat, and an AI assistant that answers only from your store’s data.
Tell me what you want built.
I reply within one working day, with questions or a first idea of scope and price.
or write to me at hello@muhandis.online



