v1

latestOpenAPI 3.0.1Apache 2.02026-07-26401961.7 KB
Sales

Add sale with item information

Add sale with item information

post/sales-with-items

Request body

sale_datestring required

The date of sale (YYYY-MM-DD)

customer_tinstring
customer_namestring
customer_idstring
trader_invoice_numberstring required
receipt_type_codestring

This field is deprecated and will be ignored if provided. The receipt type code is populated automatically based on invoice type

payment_type_codestring required
invoice_status_codestring required
callback_urlstring
invoice_detailsstring
is_tax_exemptboolean

Indicates if the sale is tax exempt

Example request

{
  "sale_date": "2026-07-14",
  "customer_tin": "P123456789Y",
  "customer_name": "John Doe",
  "customer_id": "customer_01HC3HTDAXQ50E07CWR2A2CFBD",
  "trader_invoice_number": "12345678901",
  "receipt_type_code": "S",
  "payment_type_code": "07",
  "invoice_status_code": "01",
  "callback_url": "https://example.com/callback",
  "invoice_auth": {
    "type": "REVERSE",
    "issuer": "business_01HC3J1VVVM05YCTS61G7V3KC6"
  },
  "invoice_details": "Invoice Details",
  "items": [
    {
      "item_name": "Item name",
      "item_class_code": "99000000",
      "item_bar_code": "99000001",
      "item_tax_type_code": "D",
      "quantity": 1,
      "unit_price": 3500,
      "total_amount": 3500,
      "taxable_amount": 3500,
      "package_unit_quantity": 1,
      "item_description": "DigiTax Product 01",
      "is_stockable": true
    }
  ]
}

Response

Success

idstring required
datestring required

The receipt date (DD/MM/YYYY), as printed on the physical receipt

timestring required
trader_invoice_numberstring required
receipt_type_codestring required
sale_detail_urlstring url required
serial_numberstring required
receipt_numberinteger required
invoice_numberinteger required
customer_idstring required
customer_namestring required
customer_tinstring required
customer_phone_numberstring
customer_emailstring
internal_datastring required
receipt_signaturestring required
etims_urlstring url required
original_sale_idstring
offline_urlstring url
status'PENDING' | 'FAILED' | 'COMPLETED'

status against KRA

Example response

{
  "id": "sale_01HC3HTDAXQ50E07CWR2A2CFBD",
  "date": "14/07/2026",
  "time": "04:16:11 pm",
  "trader_invoice_number": "12345678901",
  "receipt_type_code": "S",
  "sale_detail_url": "https://api.digitax.tech/sales/YKSWCIiuvx",
  "serial_number": "KRACU0400000001",
  "receipt_number": 38,
  "invoice_number": 38,
  "customer_id": "customer_01HC3HTDAXQ50E07CWR2A2CFBD",
  "customer_name": "John Doe",
  "customer_tin": "P123456789P",
  "customer_phone_number": "+254112685368",
  "customer_email": "info@namiri.tech",
  "internal_data": "PB3ZSZP3RZR3AUPYBYLUTFJDIA",
  "receipt_signature": "3JYZVPTPMYBGHG4A",
  "etims_url": "https://etims.kra.go.ke/common/link/etims/receipt/indexEtimsReceptData?{P053100692D+00+3JYZVPTPMYBGHG4A}",
  "original_sale_id": "sale_01HC3HTDAXQ50E07CWR2A2CFBD",
  "offline_url": "https://receipt.dg.tax/r/business_01JGXVVP4Z3MWQBQ3XSCJ3S4JF/SAL25-204-145657411-MHARTQ",
  "status": "completed",
  "sales_tax_summary": {
    "taxable_amount_b": 517.24,
    "tax_rate_b": 16,
    "tax_rate_e": 8,
    "catering_levy_rate": 2,
    "tax_amount_b": 82.76
  },
  "item_list": [
    {
      "id": "saleitem_01HC3J1VVVM05YCTS61G7V3KC6",
      "quantity": 1,
      "unit_price": 600,
      "total_amount": 600,
      "taxable_amount": 517.24,
      "tax_amount": 82.76,
      "tax_rate": 16,
      "tax_type_code": "B",
      "etims_item_code": "KE3NTU12345678",
      "item_id": "item_01HC3J1VVVM05YCTS61G7V3KC6"
    }
  ]
}