---
updatedAt: 2026-06-09T07:00:24.000Z
agentTools:
  projectIndex: https://ke.docs.digitax.tech/llms.txt
---

# Get reverse invoices

Retrieves a paginated list of reverse invoices.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "DigiTax Kenya API Endpoints",
    "description": "DigiTax Kenya Public API",
    "version": "3",
    "termsOfService": "https://digitax.tech/page/terms",
    "contact": {
      "name": "DigiTax",
      "url": "https://digitax.tech",
      "email": "support@namiri.tech"
    },
    "license": {
      "name": "Apache 2.0"
    }
  },
  "servers": [
    {
      "url": "https://api.digitax.tech/ke/v2",
      "description": "API"
    }
  ],
  "paths": {
    "/reverse-invoices": {
      "get": {
        "tags": [
          "Reverse Invoices"
        ],
        "summary": "Get reverse invoices",
        "description": "Retrieves a paginated list of reverse invoices.",
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Before"
          },
          {
            "$ref": "#/components/parameters/After"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "pagination",
                    "data"
                  ],
                  "properties": {
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    },
                    "data": {
                      "description": "The list of reverse invoices.",
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Sale"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "message",
          "code"
        ],
        "properties": {
          "message": {
            "type": "string",
            "description": "A human-readable explanation of the error."
          },
          "code": {
            "type": "string",
            "description": "The error code returned by the API."
          },
          "metadata": {
            "type": "object",
            "description": "Additional structured details about the error, when available.",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "Pagination": {
        "type": "object",
        "description": "Cursor details for navigating a paginated result set.",
        "properties": {
          "next": {
            "type": "string",
            "description": "The ID pointer used to retrieve the next page of results.",
            "example": "<entity>_01HC3J1VVVM05YCTS61G7V3KC6"
          },
          "previous": {
            "type": "string",
            "description": "The ID pointer used to retrieve the previous page of results.",
            "example": "<entity>_01HC3J1VVVM05YCTS61G7V3KC6"
          },
          "page_size": {
            "type": "integer",
            "description": "The number of results returned per page.",
            "example": 20
          }
        }
      },
      "Sale": {
        "type": "object",
        "required": [
          "id",
          "date",
          "time",
          "trader_invoice_number",
          "receipt_type_code",
          "sale_detail_url",
          "serial_number",
          "receipt_number",
          "invoice_number",
          "customer_id",
          "customer_name",
          "customer_tin",
          "internal_data",
          "receipt_signature",
          "etims_url",
          "sales_tax_summary"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The DigiTax ID of the sale.",
            "example": "sale_01HC3HTDAXQ50E07CWR2A2CFBD"
          },
          "date": {
            "type": "string",
            "description": "The receipt date (DD/MM/YYYY), as printed on the physical receipt",
            "example": "14/07/2026"
          },
          "time": {
            "type": "string",
            "description": "The time shown on the receipt.",
            "example": "04:16:11 pm"
          },
          "trader_invoice_number": {
            "type": "string",
            "description": "The invoice reference from your system. It must be unique across sales and credit notes in the business. References from failed transactions can be reused.",
            "example": "12345678901"
          },
          "receipt_type_code": {
            "type": "string",
            "description": "The code identifying the receipt type, such as S for an invoice or R for a credit note.",
            "example": "S"
          },
          "credit_note_reason": {
            "type": "string",
            "description": "The reason code for the credit note. Values are `01` (Missing Quantity), `02` (Missing Data), `03` (Damaged), `04` (Wasted), `05` (Material Shortage), and `06` (Refund).",
            "example": "06"
          },
          "sale_detail_url": {
            "type": "string",
            "description": "The URL for accessing the sale details.",
            "example": "https://api.digitax.tech/sales/YKSWCIiuvx",
            "format": "url"
          },
          "serial_number": {
            "type": "string",
            "description": "The receipt serial number issued by KRA.",
            "example": "KRACU0400000001"
          },
          "receipt_number": {
            "type": "integer",
            "description": "The receipt number associated with the sale.",
            "example": 38
          },
          "invoice_number": {
            "type": "integer",
            "description": "The invoice number associated with the sale.",
            "example": 38
          },
          "customer_id": {
            "type": "string",
            "description": "The DigiTax ID of the customer associated with the sale.",
            "example": "customer_01HC3HTDAXQ50E07CWR2A2CFBD"
          },
          "customer_name": {
            "type": "string",
            "description": "The name of the customer associated with the sale.",
            "example": "John Doe"
          },
          "customer_tin": {
            "type": "string",
            "description": "The tax identification number of the customer.",
            "example": "P123456789P"
          },
          "customer_phone_number": {
            "type": "string",
            "description": "The customer's phone number.",
            "example": "+254112685368"
          },
          "customer_email": {
            "type": "string",
            "description": "The customer's email address.",
            "example": "info@namiri.tech"
          },
          "internal_data": {
            "type": "string",
            "description": "The internal data returned for the sale.",
            "example": "PB3ZSZP3RZR3AUPYBYLUTFJDIA"
          },
          "receipt_signature": {
            "type": "string",
            "description": "The signature associated with the receipt.",
            "example": "3JYZVPTPMYBGHG4A"
          },
          "etims_url": {
            "type": "string",
            "description": "The URL for viewing the receipt in the eTIMS.",
            "example": "https://etims.kra.go.ke/common/link/etims/receipt/indexEtimsReceptData?{P053100692D+00+3JYZVPTPMYBGHG4A}",
            "format": "url"
          },
          "original_sale_id": {
            "type": "string",
            "description": "The DigiTax ID of the original sale.",
            "example": "sale_01HC3HTDAXQ50E07CWR2A2CFBD"
          },
          "offline_url": {
            "type": "string",
            "description": "The URL for accessing the sale receipt offline.",
            "example": "https://receipt.dg.tax/r/business_01JGXVVP4Z3MWQBQ3XSCJ3S4JF/SAL25-204-145657411-MHARTQ",
            "format": "url"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "FAILED",
              "COMPLETED"
            ],
            "description": "status against KRA",
            "example": "completed"
          },
          "sales_tax_summary": {
            "type": "object",
            "description": "Taxable amounts, tax rates, and tax amounts grouped by tax category.",
            "required": [
              "taxable_amount_a",
              "taxable_amount_b",
              "taxable_amount_c",
              "taxable_amount_d",
              "taxable_amount_e",
              "tax_rate_a",
              "tax_rate_b",
              "tax_rate_c",
              "tax_rate_d",
              "tax_rate_e",
              "tax_amount_a",
              "tax_amount_b",
              "tax_amount_c",
              "tax_amount_d",
              "tax_amount_e"
            ],
            "properties": {
              "taxable_amount_a": {
                "type": "number",
                "description": "Total taxable amount for exempt items (tax type A).",
                "example": 0
              },
              "taxable_amount_b": {
                "type": "number",
                "description": "Total taxable amount for items subject to 16% VAT (tax type B).",
                "example": 517.24
              },
              "taxable_amount_c": {
                "type": "number",
                "description": "Total taxable amount for zero-rated items (tax type C).",
                "example": 0
              },
              "taxable_amount_d": {
                "type": "number",
                "description": "Total taxable amount for non-VAT items (tax type D).",
                "example": 0
              },
              "taxable_amount_e": {
                "type": "number",
                "description": "Total taxable amount for items subject to 8% VAT (tax type E).",
                "example": 0
              },
              "tax_rate_a": {
                "type": "integer",
                "description": "Tax rate percentage for exempt items (tax type A).",
                "example": 0
              },
              "tax_rate_b": {
                "type": "integer",
                "description": "Tax rate percentage for items subject to 16% VAT (tax type B).",
                "example": 16
              },
              "tax_rate_c": {
                "type": "integer",
                "description": "Tax rate percentage for zero-rated items (tax type C).",
                "example": 0
              },
              "tax_rate_d": {
                "type": "integer",
                "description": "Tax rate percentage for non-VAT items (tax type D).",
                "example": 0
              },
              "tax_rate_e": {
                "type": "integer",
                "description": "Tax rate percentage for items subject to 8% VAT (tax type E).",
                "example": 8
              },
              "catering_levy_rate": {
                "type": "integer",
                "description": "The catering levy rate applied to the sale.",
                "example": 2
              },
              "service_charge_rate": {
                "type": "integer",
                "description": "The service charge rate associated with the sale.",
                "example": 0
              },
              "tax_amount_a": {
                "type": "number",
                "description": "Total tax amount for exempt items (tax type A).",
                "example": 0
              },
              "tax_amount_b": {
                "type": "number",
                "description": "Total tax amount for items subject to 16% VAT (tax type B).",
                "example": 82.76
              },
              "tax_amount_c": {
                "type": "number",
                "description": "Total tax amount for zero-rated items (tax type C).",
                "example": 0
              },
              "tax_amount_d": {
                "type": "number",
                "description": "Total tax amount for non-VAT items (tax type D).",
                "example": 0
              },
              "tax_amount_e": {
                "type": "number",
                "description": "Total tax amount for items subject to 8% VAT (tax type E).",
                "example": 0
              },
              "catering_levy_amount": {
                "type": "number",
                "description": "The total catering levy amount for the sale.",
                "example": 0
              },
              "service_charge_amount": {
                "type": "number",
                "description": "The total service charge amount for the sale.",
                "example": 0
              }
            }
          },
          "item_list": {
            "type": "array",
            "description": "The list of items included in the sale.",
            "items": {
              "$ref": "#/components/schemas/SaleItem"
            }
          },
          "kra_response_message": {
            "type": "string",
            "description": "The optional KRA-provided error message. This is only provided if a sale has failed."
          }
        }
      },
      "SaleItem": {
        "type": "object",
        "required": [
          "id",
          "quantity",
          "unit_price",
          "total_amount",
          "taxable_amount",
          "tax_amount",
          "tax_rate",
          "tax_type_code",
          "discount_rate",
          "discount_amount",
          "etims_item_code",
          "is_stockable",
          "item_id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The DigiTax ID of the sale item.",
            "example": "saleitem_01HC3J1VVVM05YCTS61G7V3KC6"
          },
          "quantity": {
            "type": "number",
            "description": "The quantity of the item sold.",
            "example": 1
          },
          "unit_price": {
            "type": "number",
            "description": "The price per unit.",
            "example": 600
          },
          "total_amount": {
            "type": "number",
            "description": "The total amount for the sale item.",
            "example": 600
          },
          "taxable_amount": {
            "type": "number",
            "description": "The amount subject to tax.",
            "example": 517.24
          },
          "tax_amount": {
            "type": "number",
            "description": "The total tax amount for the sale item.",
            "example": 82.76
          },
          "tax_rate": {
            "type": "number",
            "description": "The tax rate percentage applied to the sale item.",
            "example": 16
          },
          "tax_type_code": {
            "type": "string",
            "description": "The code identifying the tax category applied to the sale item.",
            "example": "B"
          },
          "discount_rate": {
            "type": "number",
            "description": "The discount rate applied to the sale item.",
            "example": 0
          },
          "discount_amount": {
            "type": "number",
            "description": "The discount amount for the sale item.",
            "example": 0
          },
          "etims_item_code": {
            "type": "string",
            "description": "The item code used to identify the item in eTIMS.",
            "example": "KE3NTU12345678"
          },
          "is_stockable": {
            "type": "boolean",
            "description": "Indicates whether the item is stockable, meaning its quantity can be tracked as inventory. Physical goods are stockable; services are not.",
            "example": false
          },
          "item_id": {
            "type": "string",
            "description": "The DigiTax ID of the item associated with the sale.",
            "example": "item_01HC3J1VVVM05YCTS61G7V3KC6"
          }
        }
      }
    },
    "parameters": {
      "After": {
        "in": "query",
        "name": "after",
        "required": false,
        "schema": {
          "type": "string",
          "description": "When paginating results, a pointer to an ID after which we want results.",
          "example": "<entity>_01HC3J1VVVM05YCTS61G7V3KC6"
        }
      },
      "Before": {
        "in": "query",
        "name": "before",
        "required": false,
        "schema": {
          "type": "string",
          "description": "When paginating results, a pointer to an ID before which we want results.",
          "example": "<entity>_01HC3J1VVVM05YCTS61G7V3KC6"
        }
      },
      "PageSize": {
        "in": "query",
        "name": "page_size",
        "required": false,
        "schema": {
          "type": "integer",
          "maximum": 20,
          "minimum": 1,
          "description": "The maximum number of items to return per page, defaults to 20.",
          "example": 20
        }
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  }
}
```