# Create an eTIMS Invoice

This guide covers issuing a compliant tax invoice, starting from a draft and
ending with a signed invoice that carries the KRA verification details (CU
invoice number and QR code).

> **Prerequisites**
> - You've [onboarded and activated your business](/docs/eTIMS/How-To-Guides/Self-Onboard-on-eTIMS).
> - You have an access token. See [Authentication API](/auth-api). Send it as `Authorization: Bearer <access_token>` on every request.
> - Your branch device is active and your items and customer exist.

## Step 1: Create the invoice (draft)

Create the invoice header with the customer and branch details.

`POST /api/sales/salesinvoices`. See [Add Sale](/etims-api) in the API
reference. Save the `id` it returns; you'll use it as `invoice_id` in the next
steps.

## Step 2: Add invoice lines

Add one line per product or service sold, each with quantity, unit price, and
tax rate (KRA tax categories A to E).

`POST /api/sales/salesinvoicelines`. Reference the `invoice_id` from Step 1.

## Step 3: Process the invoice

Move the invoice through its workflow (Draft → Submit → Approve):

`POST /api/sales/salesinvoices/{invoice_id}/transition/DRAFT_SUBMIT_APPROVE`

## Step 4: Sign the invoice

Signing sends the invoice to KRA through the device and returns the fiscal
details:

`POST /api/sales/salesinvoices/{invoice_id}/sign_sales_invoice`

A signed invoice includes the CU invoice number, the KRA verification code, and
a QR code the customer can scan to check that the invoice is genuine.

## Step 5: Retrieve or download the signed invoice

`GET /api/sales/salesinvoices/{invoice_id}/download`

## Try it interactively

Open the [eTIMS API Reference](/etims-api), set your token with the
**Set API Token** button in the top bar, and run each call above with **Try it**.

## Related

- Credit notes follow the same flow: create, process, then sign the credit note.
- [Start Using the Slade360 eTIMS API](/docs/eTIMS/How-To-Guides/Start-Using-the-eTIMS-API) covers the full integration and go-live path.
