E-Invoice/E-WayBill APIs

Overview

Introduction

This document specifies the JSON APIs supported by Octa GST Cloud in order to automate the e-invoicing workflows such as generation, retrieval and cancellation of e-invoices.

Abbreviations & References

TermDescription
IRNInvoice Reference Number
IRPInvoice Registration Portal. Currently NIC is the only authorised IRP.
APIApplication Programmer Interface
Base64 encodingMethod of encoding binary data in printable string
Base64 URL encodingMethod of encoding binary data in printable string using URL safe characters
e-Invoice Sandbox (NIC)NIC portal of e-invoice application development

Configuration

Before you start with the API integration, you will need complete one-time configuration of your account first:

  1. Generate API credentials on NIC e-invoice Portal
  2. Configure above credentials in Octa Cloud
  3. Generate API integration key for your ERP

Once the above configuration is done, you can start integrating with Octa e-invoicing and e-waybill APIs.

Step-1: Create API account on Govt e-Invoice Portal

NOTE Govt e-Invoice Portal will send an OTP to the registered mobile number. This OTP is required to generate the API username/password. You will get the OTP on the mobile number which is registered on Govt GST Portal.

  • Login to Govt e-invoice portal
  • Goto API RegistrationUser CredentialsCreate API User. System will send an OTP to registered mobile number. Enter the OTP to continue.
  • Select the option Through GSP
  • Select GSP: Chartered Information Systems Pvt Ltd
  • Select the API username and password
  • Click Submit

Step-2: Setup API account in Octa Cloud

  • Login to Octa GST. If you don't have an account, please contact us for your account creation.
  • On the Companies page, click on the Add Company button, enter your GSTIN and create the company.
  • Open the company by double clicking on the company created in the above step.
  • Click on the Settings button in the left bar (in the bottom left corner).
  • In the GSTIN Settings section:
    • Click on the E-Invoice Configuration button and enter the company details.
    • Click on the E-Invoice Credentials button and add the API credentials you generated on Govt E-Invoice Portal (generated in Step-1).

Step-3: Generate ERP Access Key

  • Login to Octa GST
  • Go to the ERP Keys page (check the buttons on the top).
  • Click on New Key button, accept the confirmation. This will generate a new ERP Key and display on screen. This key will be displayed only once. So please copy the Key Id and Key Secret shown on the screen.
  • This Key Id and Key Secret can be configured in the ERP to generate e-invoices online using Octa GST APIs.

Authentication

API authentication is done using the http basic authentication. This is done using the Authorization http header in the request. This header can be constructed as follows:

  • The username and password are combined with a single colon :.
  • The resulting string is encoded in byte array using UTF-8 encoding.
  • The resulting string is encoded in base64 string.
  • The resulting string is prefixed with the authorisation method Basic.

For example, if username is ramesh and password is elephant@123 then http header would be:

Authorization: Basic cmFtZXNoOmVsZXBoYW50QDEyMw==

Key Id and Key Secret generated on Octa Cloud Portal are used as username and password respectively. Please refer Configuration section to generate Key Id and Key Secret on Octa Cloud.

Check ERP API Usage

You can check the summary of your API usage and current API balance anytime on Octa GST:

  • Login to Octa GST
  • Go to the ERP API Usage page (check the buttons on the top).
  • Select a month to check the API usage summary in that month.
  • Your current API balance will be displayed in the top.

ERP API Usage