Add Credit Note
POST
/api/v1/sales/credit-noteIssue 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
| Field | Type | Required | Description |
|---|---|---|---|
| x-api-key | string | Required | Your Ushuru API key |
| Content-Type | string | Required | Must be application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| orgInvcNo | string | Required | Invoice number of the original approved sale being credited. |
| invcNo | string | Required | New unique invoice number for this credit note. |
| salesDt | string | Required | Credit note date in YYYYMMDD format. |
| cnclReqDt | string | Optional | Cancellation request date in YYYYMMDD format. |
| cnclDt | string | Optional | Cancellation date in YYYYMMDD format. |
| rfdRsnCd | string | Required | Reason code for the credit note. See Reason Codes above. |
| rfdAmt | number | Required | Total refund amount inclusive of VAT. |
| totTaxblAmt | number | Required | Total taxable amount being refunded (exclusive of VAT). |
| totTax | number | Required | Total VAT amount being refunded. |
| items | array | Required | Line 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
}
]
}'