Toolkit token API

This API supports authenticating the taxpayers POS systems to facilitate the submission of receipts through the POS.

Toolkit initialize Toolkit refresh cache

Overview

Toolkit will communicate with the eReceipt’s authentication method to acquire an authentication token. Authentication token is required for refreshing the cache, submit local receipts, and synhronization data from eReceipt system.

The flow to authenitcate:

  1. Internally it will call the login taxpayer API to generate an access token and that will be used to authenticate the POS.
  2. To be able to authenticate the POS, the developer must provide the client ID and client secret that were provided when registering the POS.
  3. API will return the token which is an encoded JWT token structure. If the credentials are saved, token will be re-generated automatically. If the credentials are not opted for save, any new command that requires a valid token will fail due to invalid token.

Note! • PosSerial value to be filled with your POS Serial number value, and it should be the same value used in the configuration step.
• Saved credentials will be stored in encripted format
Toolkit only suppots single Point of Sale (POS) integration

Signature

Signature: POST /toolkit/connect/token

Inputs

Body of the request contains a single object that contains these fields:

Input parameter Type Description Value example
clientId String (100) client_id input for getting the token d0394a9f-0607-40de-a978-2d3eb8375b04
clientSecret String (100) client_secret input for getting the token 6d62315e-d65a-4e41-9112-4195ea834edf
posSerial String (100) POS Serial Number input for getting the token 1234567899
posOsVersion String (50) POS Version Number input for getting the token os
posModelFramework String (10) POS Model Framework Number input for getting the token 1
presharedKey string (200) POS Pre shared key input for getting the token 03ac674216f3e1…

Outputs

Upon successful submission, API must return 200 status code with the below mentioned output parameters.

Output parameter Type Description Value example
token JWT token Encoded JWT token structure that contains the fields of the issued token, token protection attributes and TAGs assigned to the taxpayer, so that the system can access B2B or B2C features or both Encoded token value

Error Response

Error situations are reported back by this API through the standard error response.

No custom error codes are provided by this API.

Additional considerations

This API is called only over protected HTTPS channel.