Device registration on the PoS terminal

Steps involved in registering and activating a device for generating ZATCA phase 2 e-Invoices

After entering the details on the web portal for creation of an offline device proceed to the POS terminal to complete the device registration with OTP. The CSR (certificate signing request) would be generated using the details entered in the web application which would be fetched while continuing the device registration process on the NCR-Aloha PoS terminal.

Step 1: Saving Seller details

The first step in device registration is to prepare the details of the place of business so that it can be used directly during device registration and e-Invoice generation process. The details that are required from you are:

API_CODE

API code of the terminal

Agent-1234-02

POS_CODE

Code of the POS terminal

POS-1234-02

POS_NAME

Name of the POS

2

Branch_Code

The name of the branch that will be visible on ClearTax

1234-RBS Lab

Branch_Description

Brief description of the branch from where invoices are generated

1234-Jeddah

Branch_Tax_Code

Tax code that is maintained at the PoS terminal

1000000201

Branch_address

Address where the PoS terminal is located which would be used in e-Invoicing

King Abdul Aziz Rd Jeddah

Inv_CompanyCode

VAT number of the business from which the sales invoices are being generated and will be always used in e-Invoice generation.

311555804900003

Country_Code

Will be SA always and to be used as ‘Address - Province/State’ in the e-Invoice payload.

SA

CountrySubentity

State or provinde where the store of the PoS is located. To be used as ‘Address - Province/State’ in the e-Invoice payload.

Western Province

City

City where the store of the PoS is located. To be used as ‘Address - City’ in the e-Invoice payload.

Jeddah

Building_No

The building number of the address where the store of the PoS is located. To be used as ‘Additional - Building number’ in the e-Invoice payload.

8

Postal_Code

Postal code of the location where the store of the PoS is located. To be used as ‘Address - Seller postal code’ in the e-Invoice payload.

23414

CitySubdivisionName

District of the location where the store of the PoS is located. To be used as ‘Address - District’ in the e-Invoice payload.

Ash Shate

PlotIdentification

The additional number of the address to identify the location. To be used as ‘Address - Additional number’ in the e-Invoice payload.

2211

CRN_Type

The type of other seller ID to which the PoS terminal belongs to. Possible values are CRN, MOM, MLS, etc.

CRN

CRN_Code

The value of the ‘Commercial registration number’ to be used during e-Invoice generation. This will be the value of ‘Other seller ID’ used in the payload of e-Invoicing.

1000000001

Step 2: Saving seller details

The above prepared details would be used while submitting the invoice to ZATCA. The information would be added to every invoice generated at the NCR Aloha Fiscal manager and submitted to ZATCA via the ClearTax e-Invoice application. To save the details in the ClearTax application execute the below command on the ‘Command Prompt’ of the PoS terminal:

java -jar ncr-aloha-app.jar  --operation SAVE_BRANCH_DETAILS --apiCode Agent-6510-02 --posCode POS-6510-02 --posName 2 --branchCode "1234-RBS Lab" --branchDescription 1234-Jeddah --branchTaxCode "1000000201" --branchAddress "King Abdul Aziz Rd Jeddah" --invCompanyCode 311555804900003 --countryCode SA --countrySubentity "Makkah Province" --city Jeddah --buildingNo 8888 --postalCode 23414 --citySubdivisionName  "Ash Shate" --plotIdentification 3243 --crnType CRN --crnCode 1000000001 --sellerName "TestUser"

After the successful execution of the above command the details would be saved in the ClearTax offline e-Invoice application and you will see the below message on your screen.

Step 3: Device registration with OTP

Use the following command to register the device using the OTP from the ZATCA Fatoora portal:

java -jar ncr-aloha-app.jar -env sandbox -operation CSR_PCSID -deviceId <device ID> -clearAuthToken <Authentication token> -vat <VAT registration number> -otp <OTP Fatoora portal>

The details to be used in the command are:

  • Device ID - Copy the device ID from the device settings page of web portal and enter it

  • Auth token - Fetch an active auth token from ‘Integrations’ → ‘API Clients’ and add it.

  • VAT number - VAT registration number of your business

  • OTP - Use a correct active OTP from ZATCA Fatoora portal as per the environment for device registration. OTP from the simulation environment should be used on sandbox and production should be used on production.

After executing the above command a device will be successfully registered with ZATCA. You will get a success message on the command prompt terminal once the operation is completed. The status of the device can also be checked on the 'Devices' page in settings section of ClearTax.

Once the device is active it will be used to sign all invoices generated at the PoS terminal of NCR Aloha.

Last updated