# E-Invoice & E-WayBills: Introduction

This section outlines the JSON-based APIs provided by Octa to help you automate your e-invoicing workflows, including
the generation, retrieval, and cancellation of e-invoices & e-waybills.

## Abbreviations & References

| Term                                                                 | Description                                                                  |
| -------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| IRN                                                                  | Invoice Reference Number                                                     |
| IRP                                                                  | Invoice Registration Portal                                                  |
| [Base64 encoding](https://en.wikipedia.org/wiki/Base64)              | Method of encoding binary data in printable string                           |
| [Base64 URL encoding](https://tools.ietf.org/html/rfc4648#section-5) | Method of encoding binary data in printable string using URL safe characters |
| [e-Invoice Sandbox (NIC)](https://einv-apisandbox.nic.in)            | NIC portal of e-invoice application development                              |

## Configuration

Before using the e-invoice and e-waybill APIs, you must complete a one-time account configuration:

1. Generate API credentials from the NIC e-Invoice Portal.
2. Configure these credentials in your Octa account.

Once this setup is complete, you can begin using Octa’s e-invoicing and e-waybill APIs.

> **Warning:** Keep your NIC API credentials secure. These credentials are directly linked to your GSTIN, and any misuse could impact
> your compliance obligations.

### Step-1: Create API users on Govt e-Invoice Portal

> **Tip:** **OTP Required**: 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](https://einvoice1.gst.gov.in)
- Goto **API Registration** → **User Credentials** → **Create API User**. System will send an OTP to registered mobile
  number. Enter the OTP to continue.
- Select the option **Through GSP**
- Select GSP: **Blowbits Solutions LLP**
- Select the API username and password
- Click **Submit**
- Repeat the process for **Alankit Limited** GSP also.

> **Tip:** **Service Availability**: We are configuring two API users so that even if one GSP is down, e-invoice services can
> continue without any interruptions.

### Step-2: Configure API users in Octa

- Login to [Octa GST](https://cloud.octagst.com). If you don't have an account, please contact us for your account
  creation.
- Open the company/GSTIN you want to use for e-invoicing/e-waybills. If the company is not available in Octa, you can
  add it on the **Home** page. Simply click on the **Add Company** button, enter your GSTIN and create the company.
- 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).