Blog / · E-invoicing · ERP · POS
Integrating JoFotara: what actually breaks, and the 3-digit code everyone gets wrong
Lessons from integrating JoFotara, Jordan's national e-invoicing system, for several companies, with a decoder for the 3-digit invoice code.
Context
I have integrated JoFotara, Jordan's national e-invoicing system, for several companies: industrial firms, training and education providers, and others. The clearest lesson is that the hard part is not only technical. It is a mix of a new system, constant change, and a communication gap between accounting and engineering.
I have also built a direct integration with the Saudi e-invoicing system, and the difference between the two is large.
What hurts integration quality
- No clear, official sandbox for testing before production. Any test invoice is real and has to be reversed with a return.
- Updates arrive without notice, changelog or a channel like any normal API. Invoices simply start getting rejected.
- Documentation is paper only and does not cover all the cases a developer meets.
The XYZ invoice-type code
The point of most confusion between accountants and developers is the 3-digit invoice-type code. It is not a random number: each digit means something.
X is the sale type or location: 0 local, 1 export, 2 development zones. Y is the payment method: 1 cash, 2 credit (receivables). Z is the taxpayer type: 1 income tax, 2 general sales tax, 3 special sales tax. That gives 3 × 2 × 3 = 18 possible codes.
Interactive
Decode an invoice-type code
3 × 2 × 3 = 18 combinations. Pick a value for each digit.
What I recommend
Build an internal mapping dictionary that accounting and engineering both sign off, so the decision is made once and the accounting classification never gets mixed up with the technical implementation.
Reducing the options often helps. A company integrating a point-of-sale system that only sells inside Jordan usually needs just local (0), cash (1) or credit (2), and general sales (2). In practice that is two codes: 012 for local cash general sales and 022 for local credit general sales. The rules become clear, coding errors drop, and the teams stop arguing.
Written by Osama Al Asasfeh, senior AI software engineer and consultant in Amman. Originally posted on LinkedIn. Need help with something similar? See AI and software consulting or hire me.
More posts
- Taking on Upwork: the case that changed its terms of serviceFreelancing, 25 Mar 2026
- Join Us: A Workshop with Business and Technology ExpertsInvitation, Jan 2026
- Why clients stop trusting software vendors, and how to earn it backDelivery, 27 Apr 2025