How to Get the PRAL API Token: Step-by-Step FBR Setup

Published: 3 November 2026 | Updated: 5 November 2026 | Reading time: 10 minutes | Published by the FinSmart Team

To transmit invoices to FBR through the Digital Invoicing API, your business needs a security token issued by PRAL (Pakistan Revenue Automation (Pvt.) Ltd, FBR's IT arm). Tokens are issued through the Digital Invoicing enrolment on IRIS, FBR's online portal. This guide walks through the process.

What you will get:

Prerequisites: Before You Start

You will need the following:

Requirement Why it is needed Where to get it
Business NTN (7 digits) Identifies your business to FBR; the token is issued against it Your FBR registration
Active sales tax registration (STRN) Digital Invoicing applies to registered persons under the Sales Tax Act 1990 Check your status on IRIS (https://iris.fbr.gov.pk); register first if needed
IRIS login Enrolment and the tokens are handled on IRIS Your IRIS user ID and password
Technical contact details IRIS asks for a technical contact person, mobile and email, the software type (cloud or on-premises) and version FinSmart provides the software details during onboarding
Server IP addresses When PRAL is your Licensed Integrator, the IPs that will call the API are whitelisted FinSmart supplies its server IPs for your enrolment
⚠️ If you are not yet registered with FBR:

Complete NTN and sales tax registration before enrolling for Digital Invoicing.

Step-by-Step: Getting the Tokens

Step 1: Log in to IRIS

  1. Open https://iris.fbr.gov.pk in your browser
  2. Enter your IRIS user ID and password and sign in
  3. Confirm that the business name and NTN shown are correct

Step 2: Open Digital Invoicing and choose the integration mode

  1. Open the Digital Invoicing section
  2. Choose API Integration (for businesses using invoicing software such as FinSmart)
  3. Choose your Licensed Integrator: PRAL provides integration and sandbox testing free of cost, or you can select another FBR Licensed Integrator. FinSmart connects through the PRAL API.
⚠️ If the Digital Invoicing option is missing:

Step 3: Enter technical details, business nature and sector

  1. Fill in the technical contact person, mobile and email
  2. Enter the software type and version (FinSmart gives you these)
  3. Tick your business nature (manufacturer, importer, exporter, distributor, wholesaler, retailer, service provider, other; more than one is allowed)
  4. Select one sector (for example FMCG, pharmaceuticals, textile, steel, services, or all other sectors)

Business nature and sector decide which sandbox scenarios you must pass. Choose them carefully.

Step 4: IP whitelisting

  1. Enter the server IP addresses that will call the API (FinSmart provides these)
  2. Submit the application
  3. Once PRAL accepts the IPs, the sandbox environment opens

Step 5: View the sandbox token

  1. Open the Sandbox Environment step
  2. Click View Web API Environment Details
  3. The pop-up shows the sandbox endpoints and the sandbox security token
  4. Share it with the FinSmart team through the onboarding channel agreed with you, not by open email or chat
✓ Sandbox token issued

The FinSmart team stores it for your business server-side. You can now log in to FinSmart in sandbox mode and work through the scenarios.

Step 6: Pass the eligible sandbox scenarios

The sandbox dashboard on IRIS lists your eligible scenarios and shows which are successful, pending or unsuccessful. Submit an invoice for each eligible scenario until all of them show Successful. See the sandbox scenarios guide.

Step 7: Get the production token

  1. When every eligible scenario has passed, IRIS generates the production token automatically
  2. Open the Production Environment step and click View Security Token
  3. Pass it to the FinSmart team through the agreed onboarding channel; it is stored separately from the sandbox token
✓ Production token ready

Log in to FinSmart in production mode. Production submissions ask for confirmation before they are sent, because each one is a legal tax record.

Keeping Your Tokens Safe

Do:

Do not:

Configuring FinSmart with Your Tokens

You do not enter tokens in the FinSmart app yourself:

  1. The FinSmart team sets up your business and stores the sandbox token (and later the production token) for it
  2. You log in and choose Sandbox or Production mode; the server uses the matching token
  3. Invoice numbering is kept separate for each mode
  4. Every FBR request and response is written to a server-side audit log for your business

Token Maintenance

How long does a token last?

When to act

Situation Action
The API returns an authentication error with a token that used to work Check that the right token is used for the right environment, then contact PRAL's DI support through the CRM
The token has been exposed Contact PRAL's DI support immediately and ask for the token to be replaced
Switching from one invoicing system to another Give the new provider the token through a secure channel and remove it from the old system

Troubleshooting: Common Issues

❌ "Digital Invoicing option not visible in IRIS"

Solution:

❌ "The API rejects the token"

Solution:

❌ "No production token yet"

Solution:

Next Steps

1. Test in sandbox

Work through the sandbox scenarios eligible for your business nature and sector.

2. Review FBR reference data

Get familiar with FBR error codes and HS codes and units of measure.

3. Get the production token

Once every eligible scenario passes, view the production token on IRIS and pass it to the FinSmart team.

4. Go live

Submit your first real invoice, confirm the FBR invoice number and QR code on the PDF, and check the invoice on IRIS.

Quick Reference: Token Checklist

Before you go live, make sure that:

Need Help?

Contact FinSmart: info@finsmart.pk | WhatsApp: +92 316 8222144

PRAL Digital Invoicing support: the DI CRM at https://dicrm.pral.com.pk, or the FBR helpline listed on fbr.gov.pk

Book a free demo

Related Reading