Add Credit Note

POST/api/v1/sales/credit-note

Issue a credit note against a previously submitted sales invoice using KRA-native fields. The original invoice must have been approved by Kenya Revenue Authority before a credit note can be raised.

Requires x-api-key

http://localhost:8100/api/v1/sales/credit-note

Credit Note Reason Codes

Headers

FieldTypeRequiredDescription
x-api-keystringRequiredYour Ushuru API key
Content-TypestringRequiredMust be application/json

Request Body

FieldTypeRequiredDescription
orgInvcNostringRequiredInvoice number of the original approved sale being credited.
invcNostringRequiredNew unique invoice number for this credit note.
salesDtstringRequiredCredit note date in YYYYMMDD format.
cnclReqDtstringOptionalCancellation request date in YYYYMMDD format.
cnclDtstringOptionalCancellation date in YYYYMMDD format.
rfdRsnCdstringRequiredReason code for the credit note. See Reason Codes above.
rfdAmtnumberRequiredTotal refund amount inclusive of VAT.
totTaxblAmtnumberRequiredTotal taxable amount being refunded (exclusive of VAT).
totTaxnumberRequiredTotal VAT amount being refunded.
itemsarrayRequiredLine items being credited. Same structure as the sales items array.

Request

{
  "original": {
    "invcNo": 42,
    "trdInvcNo": "INV-2024-001",
    "creditNoteInvcNo": 10042,
    "pmtTyCd": "09"
  },
  "reason": "01",
  "regrId": "USR01",
  "regrNm": "Admin",
  "lineItems": [
    {
      "itemCd": "SV0000000Z001",
      "itemNm": "Monthly SaaS Subscription",
      "qtyUnitCd": "U",
      "qty": 1,
      "prc": 5000,
      "taxTyCd": "B",
      "taxblAmt": 4310.34,
      "taxAmt": 689.66,
      "totAmt": 5000
    }
  ]
}

Response

{
  "success": true,
  "resultMsg": "Credit note submitted to KRA",
  "data": {
    "resultCd": "000",
    "internalData": "AbCdEfGhIjKlMnOpQrStUvWxYz...",
    "receiptSignature": "XxXxXxXxXxXxXxXxXxXxXxXx...",
    "sdcDateTime": "20240120141500"
  }
}
curl -X POST http://localhost:8100/api/v1/sales/credit-note \\
  -H "x-api-key: YOUR_API_KEY" \\
  -H "Content-Type: application/json" \\
  -d '{
    "orgInvcNo": "INV-2024-001",
    "invcNo": "CN-2024-001",
    "salesDt": "20240120",
    "rfdRsnCd": "05",
    "rfdAmt": 5000,
    "totTaxblAmt": 4310.34,
    "totTax": 689.66,
    "items": [
      {
        "itemCd": "SV0000000Z001",
        "itemNm": "Monthly SaaS Subscription",
        "qtyUnitCd": "U",
        "qty": 1,
        "taxTyCd": "B",
        "taxblAmt": 4310.34,
        "taxAmt": 689.66,
        "totAmt": 5000
      }
    ]
  }'