The temptation is to send one successful invoice and declare it working. That invoice is the easiest case you will ever process.
Use a test environment
Confirm with FBR or your integrator what test facility exists and how to get access. The thing that matters is that test transmissions are distinguishable from real ones and do not enter your tax records.
Never test against production with "we'll cancel it afterwards". Invoices have legal weight, and the correction window in chapter seven is not unlimited.
A test matrix that reflects reality
Work through each of these and record the outcome. Most were discovered the hard way by someone else.
Transactions
- Sale to a registered buyer.
- Sale to an unregistered buyer.
- Multiple line items at different tax rates on one invoice.
- A zero-rated or exempt item, if you sell any.
- An item with further tax or withholding, if applicable.
- A discount applied at line level, and at invoice level.
- A very large invoice — fifty lines or more.
- An invoice for a tiny amount.
Returns and corrections
- A credit note against an earlier invoice.
- A debit note.
- A partial return of a multi-line invoice.
Failures — the important section
- Invalid buyer registration number. What does the counter staff member see?
- Missing mandatory field.
- Tax calculation that disagrees with the rate for that item code.
- Network timeout mid-transmission. Pull the cable.
- Duplicate submission of the same invoice.
- Expired or wrong credentials.
What you are testing for in the failure cases
Not that an error occurs — that it is handled:
- Does the error message tell the operator what to fix, or does it show a stack trace?
- Is the sale recoverable without re-entering everything?
- Does the invoice number sequence stay intact after a failure?
- Can the invoice be retried once the problem is corrected?
- Is it impossible to accidentally transmit the same invoice twice?
Test the duplicate case specifically. A retry after a timeout where the first attempt actually succeeded is the classic way to end up with two reported invoices for one sale.
Involve the people who will use it
Have an actual counter operator run test transactions, including the failures, before go-live. They will find things no developer does, and they are the ones who will face a queue when it breaks.
Go-live readiness
- Every test case above passes or has a documented workaround.
- Staff trained, including what to do on rejection.
- A written fallback procedure for an outage, confirmed as acceptable with FBR.
- Someone named as responsible when it fails, and reachable.
- A plan to monitor the first week's transmissions for silent failures.
Start live with one counter or one branch rather than the whole business on day one. The problems you find will be cheaper.