Skip to main content
An e-invoice is a GST invoice registered with the government portal, which assigns it an IRN (Invoice Reference Number) and QR code. In the Swipe API, e-invoicing is a flag on document creation — not a separate endpoint.

Before you start

1

Enable the plan

E-invoice APIs need the E-Invoices & EwayBills plan on your account. Mail api@getswipe.in for a trial and integration support.
2

Connect to the e-invoice portal

Open E-invoices in your dashboard and click Connect to E-Invoice Portal.
3

Know which government portal you're on

By default the API points to the Government sandbox portal — generated e-invoices aren’t legally valid until you switch. Mail api@getswipe.in to connect to the production portal.

Generate an e-invoice

Create the document as usual and set einvoice: true. The response then carries the government-issued identifiers alongside the normal document fields:
For a valid e-invoice the government portal needs correct GST data — the party’s gstin, item hsn_codes, and address state values from Currencies, States & Countries. Portal rejections come back as PORTAL_ERROR_{code} — see Error codes.

Download the PDF

The e-invoice PDF (with its QR code) comes from the standard Get document PDF endpoint using the document’s hash_id.

Endpoints

Create a document

Set einvoice: true in the create payload.

Get document PDF

Download the e-invoice PDF.