Add Express Credit Note

POST/api/v1/sales/credit-note-express

Submit a simplified credit note. Requires only the original invoice number, reason code, and line items, you do not need to re-specify all original invoice fields. The credit note invoice number is auto-generated if not provided.

Requires x-api-key

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

Headers

FieldTypeRequiredDescription
x-api-keystringRequiredYour Ushuru API key.
Content-TypestringRequiredapplication/json

Request Body

FieldTypeRequiredDescription
orgInvcNonumberRequiredOriginal invoice number to reverse.
reasonstringRequiredCredit note reason code. See Reason Codes below.
lineItemsarrayRequiredLine items being credited back.
creditNoteInvcNonumberOptionalCredit note invoice number. Defaults to orgInvcNo + 10000.
trdInvcNostringOptionalTrader credit note invoice number. Defaults to CN-{orgInvcNo}.
pmtTyCdstringOptionalPayment method code. Defaults to '01' (Cash).
custTinstringOptionalCustomer Kenya Revenue Authority PIN.
custNmstringOptionalCustomer name.
regrIdstringOptionalRegistering user ID. Defaults to 'USR01'.
regrNmstringOptionalRegistering user name. Defaults to 'System'.

Credit Note Reason Codes

Request

{
  "orgInvcNo": 42,
  "reason": "01",
  "custTin": "A000000000Z",
  "custNm": "BUYER COMPANY LTD",
  "pmtTyCd": "09",
  "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,
  "data": {
    "cisInvcNo": 44,
    "intrlData": "AbCdEfGhIjKlMnOpQrStUvWxYz...",
    "rcptSign": "XxXxXxXxXxXxXxXxXxXxXxXx...",
    "sdcDateTime": "20240115110000"
  }
}
curl -X POST http://localhost:8100/api/v1/sales/credit-note-express \\
  -H "x-api-key: YOUR_API_KEY" \\
  -H "Content-Type: application/json" \\
  -d '{
    "orgInvcNo": 42,
    "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
    }]
  }'