Business Central integration
Connecting Business Central to FBR digital invoicing
For Business Central users, online or on-premises, and the local partners who support them. Send every posted sales invoice to FBR without changing how your team posts.

How it works
What happens when a Business Central invoice is posted
Posting is when a Business Central invoice becomes final. It is also when FBR should receive it.
In Business Central you create a sales invoice, or a sales order that you ship and invoice, and then you post it. Posting creates a posted sales invoice. This is a separate document that no one can edit. It gets its own number from the posted-invoice number series, separate from the draft’s number. This posted document, with its number, its lines and its VAT amounts, is what FBR should receive. It is what your books and your customer’s copy show.
The link to FBR starts at that moment. It does the same five things for every posted sales invoice:
- Spot the posting through an event in an AL extension, a business event that Power Automate picks up, or a service that checks Business Central’s API for new posted invoices.
- Add FBR’s details: the FBR sale type for each line’s VAT set-up, the HS code and FBR unit for each item, and the customer’s registration type and province.
- Send it to eInvoicePro’s API, with the posted invoice number as its unique reference. So if your side sends it again, it never reaches FBR twice.
- Check the result line by line. The invoice counts as sent only when FBR has returned its number and no line shows an error.
- Save it on the posted invoice. The FBR number, status and any error go into new fields on the posted invoice header, and onto the printed copy with the QR code.
Why posting shouldn’t wait for FBR
You can contact FBR from inside the posting routine itself, but it is a bad idea. Posting then has to wait for FBR to reply. A dropped connection leaves the user with an error in the middle of a financial transaction. The better way lets posting finish first, and a background task sends the invoice afterwards. Business Central’s job queue, its built-in tool for running tasks in the background, exists for exactly this. If sending fails, the task resends it and reports it, and the person who posted is never held up.
What “cancel” means after posting
Business Central lets you correct or cancel a posted invoice. This creates a corrective credit memo. That keeps your books right, but FBR is never told. No API call can cancel or edit an invoice FBR already has. To correct FBR’s copy, someone does it by hand in FBR’s own system. For a genuine mistake, you can do this for 72 hours. After that, you need the Commissioner’s approval.
Your options
Three ways to connect Business Central
All three send the same invoices to FBR. They differ in who builds them, how many invoices they handle with ease, and what they need from your system.
AL extension
An extension listens for the sales posting event and sets aside each posted invoice. A scheduled background job then sends it to eInvoicePro and saves FBR’s reply on the invoice. Everything stays inside Business Central, versioned with your other extensions.
Fits when: you post a steady or high number of invoices, and a partner or developer looks after your AL code.
Power Automate
A flow starts when a new invoice is posted. It can use Business Central’s sales invoice posted business event, which is still marked as a preview, or it can watch the API for new invoices. It then sends the invoice to eInvoicePro and updates it in Business Central through the API.
Fits when: you post a modest number of invoices and want the least code.
Outside service
A small program asks Business Central’s API for new posted sales invoices every few minutes. It sends them to FBR through eInvoicePro and saves the results back. Nothing is installed in Business Central.
Fits when: you already use a tool that links your business systems, or several of your systems send invoices to FBR.
Online or on-premises?
Both work. Business Central online can connect to eInvoicePro directly. An on-premises installation, including one upgraded over the years from Dynamics NAV, must be allowed to make outgoing HTTPS calls. That takes a firewall rule, not a project. On an older installation, test the posting event on your own version before you build anything on it.
Your data
Where FBR’s details go in Business Central
Standard Business Central already has a place for some of what FBR needs. You add the rest with table extensions, which add new fields to Business Central’s own records.
| What FBR asks for | Where it goes in Business Central | What to watch |
|---|---|---|
| Buyer NTN or CNIC | The customer’s VAT registration number field, if you use it for the NTN | Digits only. Choose one field for the NTN and always use that one |
| Buyer registration type | A new customer field, added with a table extension | Filled in by checking the customer’s number with FBR |
| Buyer province | The customer’s address | Use FBR’s province names, not the city |
| Invoice number | The posted sales invoice number | Use the posted number, not the draft number. FBR accepts only letters, digits and hyphens |
| Sale type and SRO | Your VAT posting set-up: each pair of business and product posting groups | Match each pair used on sales to an FBR sale type and, where needed, SRO references |
| HS code | The item’s tariff number, used for customs and Intrastat | It links to Business Central’s tariff number list, so add FBR’s codes there, or use a new field |
| Unit of measure | The item’s unit of measure | Use FBR’s unit names. The HS code decides which units are allowed |
| Values and VAT | Posted invoice lines | Prices that include VAT must be split back into value and tax for each line |
| FBR number, status, error | New fields on the posted sales invoice header, added with a table extension | Your team, your reports and the printed copy all read from here |
If you set up registered and unregistered buyers as different VAT business posting groups, the buyer type can be read straight from that group.
Start with the VAT posting set-up
Mapping means matching your Business Central settings to FBR’s codes, and it starts with the VAT posting set-up. Business Central works out each line’s tax from a pair of posting groups, one on the customer and one on the item. So match each pair to FBR: “this pair, used on sales, means this FBR sale type.” Take the tax rate from FBR’s list for that sale type and invoice date, not from Business Central’s VAT percentage. For the rules FBR applies to each line, see matching tax codes to FBR sale types.
Build or buy
Build the FBR link in AL, or use eInvoicePro
AL code can talk to FBR directly. The real question: does your partner want to keep up with FBR’s technical rules for as long as you run Business Central?
Business Central talks to FBR directly
- Your partner builds and looks after FBR’s invoice format, access tokens, resending and line-by-line error checks in AL
- Every FBR technical change means a new extension version, tested and released
- FBR accepts a repeated invoice as a new one, so every resend must be built to never send the same invoice twice
- Your AL code must also look up valid HS codes, units, rates and SRO references from FBR
Business Central → eInvoicePro → FBR
- The extension or flow turns Business Central data into one API call
- FBR changes don’t need a new extension version. eInvoicePro handles them
- If a reply is lost, the invoice is resent safely and never sent twice, one invoice at a time, and FBR’s original reply is kept
- All your companies’ NTNs sit in one account, with one switch between FBR’s test system (the sandbox) and the live system
Using Business Central? Book a demo
See how eInvoicePro sends invoices to FBR, and bring your questions about connecting it to Business Central.
Watch these
Business Central mistakes to avoid
Each of these is easy to miss in a test company and costly in a live one.
Posting
- The sales posting event also runs during preview posting. Skip those, or you send FBR invoices that don’t exist
- The same event covers credit memos and other sales documents, so check the document type
- The posted invoice number is not the draft number. Send the posted one
- Batch posting many orders at once creates a burst of invoices. Put them on a waiting list and send them in the background, not one by one during posting
Documents
- Cancelling or correcting a posted invoice creates a corrective credit memo in Business Central. It does not cancel anything at FBR
- Invoices posted from sales orders and direct sales invoices both go to FBR
- Discounts and prices that include VAT must be worked out again for each line for FBR
- Invoices between your own companies need a rule, because FBR rejects an invoice addressed to the seller’s own NTN
Set-up
- Test environments and copied companies must never send invoices to FBR’s live system
- On-premises servers must allow outgoing HTTPS calls
- Business events for Power Automate are still in preview, so expect them to change
- Every company in the database needs its own NTN and FBR access details set up
Going live
A realistic four-week plan
Business Central’s test environments pair neatly with FBR’s test system. Just keep both of them well apart from your live systems.
-
Match your posting set-up to FBR
List every pair of VAT business and product posting groups used on sales, and give each one an FBR sale type. Fill in HS codes and FBR units on the items you sell, and registration types on customers.
-
Build and test in the sandbox
Build the extension or flow in a Business Central test environment, connected to eInvoicePro’s test mode. Each NTN has its own list of FBR test scenarios to pass. Passing them unlocks the token for live filing.
-
Run both side by side
In the live system, switch on check-only mode: FBR checks each posted invoice but does not record it. Compare the results with the posted sales invoice list every day to see which items or customers still need matching.
-
Send every posted invoice
Switch on live filing, print the FBR number and QR code on the invoice report, and make one person responsible for failed and pending invoices.
Finance
Matches posting groups to FBR sale types, and checks the daily comparison.
Business Central partner or IT
Builds the extension or flow, the table extensions and the invoice report change, and looks after the test and live systems.
eInvoicePro
Checks every invoice against FBR's lists, files it with FBR and returns FBR's invoice number and QR data for the Business Central invoice. Our team helps you set it up.
FAQ
Frequently Asked Questions
Still have a question?
Ask our team on WhatsApp. Tell us what you sell and where, and we will point you to the right setup.
Ask on WhatsAppDoes Business Central support FBR digital invoicing on its own?
No. In Pakistan, partners sell Business Central as Microsoft’s worldwide version, and it has no FBR connection built in. You add one with an AL extension, a Power Automate flow or an outside service. Each of these sends posted invoices to eInvoicePro, which sends them to FBR.
Should we use an AL extension or Power Automate?
If you post a modest number of invoices and want little code, a Power Automate flow is enough. Note that the “sales invoice posted” business event is still in preview. For a steady or high number of invoices, or to keep the logic versioned with your other extensions, an AL extension with a background job is the stronger choice. Either way, eInvoicePro does the FBR work.
Which invoice number do we send to FBR?
The posted sales invoice number: the one on the posted document your customer receives, not the draft’s number. FBR accepts only letters, digits and hyphens, so check your posted-invoice number series.
Does cancelling a posted invoice in Business Central cancel it at FBR?
No. It creates a corrective credit memo in your books, and FBR is not told. To change FBR’s record, you do it in FBR’s own system, within 72 hours of the invoice for an honest mistake.
We are on an older on-premises installation. Can we still connect?
Yes. The server must be able to make outgoing HTTPS calls, and you first test the posting event your extension relies on against your version. If extensions are hard to set up in your system, an outside service that reads Business Central’s API works instead.
We run several companies in one Business Central. Do we need a separate connection for each?
No. You need one connection, with separate settings for each company. Each company sends invoices under its own NTN and FBR access details, and one eInvoicePro account holds them all.
Do we need to replace Business Central?
No. Your team keeps posting in Business Central exactly as it does now. The connection only adds a step after posting that sends each invoice to FBR, plus a few fields for FBR’s reply.
Continue
Related guides & articles
Matching tax codes to FBR sale types
Turning VAT posting groups into what FBR checks on every line.
Read moreWhat to store once FBR answers
The fields your posted invoices need, and why each one matters.
Read moreDigital invoicing API
Sending invoices, stopping duplicates, instant updates and the test switch.
Read moreNetSuite + FBR guide
The same eInvoicePro approach for NetSuite and OneWorld.
Read moreFrom FBR’s test system to going live
How passing FBR’s test scenarios unlocks your live token.
Read moreSection 64D tax credit
What integration spend qualifies for the 10% credit.
Read moreReady to simplify your FBR digital invoicing?
Join 2000+ businesses that use eInvoicePro to make invoices and send them to FBR.