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 seteinvoice: true. The response then carries the government-issued identifiers alongside the normal document fields:
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’shash_id.
Endpoints
Create a document
Set
einvoice: true in the create payload.Get document PDF
Download the e-invoice PDF.

