curl --request POST \
--url https://sync2books-compliance-api.apps.kintro.money/v1/credit-notes \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"traderInvoiceNumber": "CN-2026-0001",
"returnDate": "2026-10-03",
"saleId": "sale_example_1",
"reason": "06"
}
'import requests
url = "https://sync2books-compliance-api.apps.kintro.money/v1/credit-notes"
payload = {
"traderInvoiceNumber": "CN-2026-0001",
"returnDate": "2026-10-03",
"saleId": "sale_example_1",
"reason": "06"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
traderInvoiceNumber: 'CN-2026-0001',
returnDate: '2026-10-03',
saleId: 'sale_example_1',
reason: '06'
})
};
fetch('https://sync2books-compliance-api.apps.kintro.money/v1/credit-notes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sync2books-compliance-api.apps.kintro.money/v1/credit-notes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'traderInvoiceNumber' => 'CN-2026-0001',
'returnDate' => '2026-10-03',
'saleId' => 'sale_example_1',
'reason' => '06'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sync2books-compliance-api.apps.kintro.money/v1/credit-notes"
payload := strings.NewReader("{\n \"traderInvoiceNumber\": \"CN-2026-0001\",\n \"returnDate\": \"2026-10-03\",\n \"saleId\": \"sale_example_1\",\n \"reason\": \"06\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sync2books-compliance-api.apps.kintro.money/v1/credit-notes")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"traderInvoiceNumber\": \"CN-2026-0001\",\n \"returnDate\": \"2026-10-03\",\n \"saleId\": \"sale_example_1\",\n \"reason\": \"06\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sync2books-compliance-api.apps.kintro.money/v1/credit-notes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"traderInvoiceNumber\": \"CN-2026-0001\",\n \"returnDate\": \"2026-10-03\",\n \"saleId\": \"sale_example_1\",\n \"reason\": \"06\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"sale": {
"id": "sale_example_2",
"type": "credit_note",
"status": "completed",
"traderInvoiceNumber": "CN-2026-0001",
"saleDate": "2026-10-03",
"paymentTypeCode": "01",
"customer": {
"name": "Example Customer Ltd",
"pin": "P000000000X",
"phone": null,
"email": null
},
"lines": [
{
"id": "line_example_1",
"itemId": "itm_example_1",
"name": "500ml Cooking Oil",
"description": "500ml Cooking Oil",
"quantity": -2,
"unitPrice": 3500,
"total": -7000,
"taxableAmount": -6034.48,
"taxAmount": -965.52,
"taxRate": 16,
"taxTypeCode": "B"
}
],
"totals": {
"total": -7000,
"taxableAmount": -6034.48,
"taxAmount": -965.52
},
"receipt": {
"cuInvoiceNo": "KRACU0000000000/13 NC",
"receiptNumber": 13,
"receiptLabel": "NC",
"scuId": "KRACU0000000000",
"scuDate": "02/10/2026",
"scuTime": "10:15:30",
"totalReceiptCounter": "13",
"signature": "AAAA-BBBB-CCCC",
"internalData": "DDDD-EEEE-FFFF",
"verificationUrl": "https://etims-verify.example/receipt?id=EXAMPLE",
"originalCuInvoiceNo": "KRACU0000000000/12 NS"
},
"originalSaleId": "sale_example_1",
"error": null,
"callback": null
}
}
}Issue a credit note
Reverses an accepted sale in full. The buyer and lines are copied from the sale, so you send only the sale id, your own number and a return date. A sale can be credited once. The status codes work as for POST /v1/sales: 201 accepted, 202 in flight, 422 rejected, and 200 with Idempotent-Replayed: true for a repeated request.
Required scope: sales:write.
curl --request POST \
--url https://sync2books-compliance-api.apps.kintro.money/v1/credit-notes \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"traderInvoiceNumber": "CN-2026-0001",
"returnDate": "2026-10-03",
"saleId": "sale_example_1",
"reason": "06"
}
'import requests
url = "https://sync2books-compliance-api.apps.kintro.money/v1/credit-notes"
payload = {
"traderInvoiceNumber": "CN-2026-0001",
"returnDate": "2026-10-03",
"saleId": "sale_example_1",
"reason": "06"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
traderInvoiceNumber: 'CN-2026-0001',
returnDate: '2026-10-03',
saleId: 'sale_example_1',
reason: '06'
})
};
fetch('https://sync2books-compliance-api.apps.kintro.money/v1/credit-notes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sync2books-compliance-api.apps.kintro.money/v1/credit-notes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'traderInvoiceNumber' => 'CN-2026-0001',
'returnDate' => '2026-10-03',
'saleId' => 'sale_example_1',
'reason' => '06'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sync2books-compliance-api.apps.kintro.money/v1/credit-notes"
payload := strings.NewReader("{\n \"traderInvoiceNumber\": \"CN-2026-0001\",\n \"returnDate\": \"2026-10-03\",\n \"saleId\": \"sale_example_1\",\n \"reason\": \"06\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sync2books-compliance-api.apps.kintro.money/v1/credit-notes")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"traderInvoiceNumber\": \"CN-2026-0001\",\n \"returnDate\": \"2026-10-03\",\n \"saleId\": \"sale_example_1\",\n \"reason\": \"06\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sync2books-compliance-api.apps.kintro.money/v1/credit-notes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"traderInvoiceNumber\": \"CN-2026-0001\",\n \"returnDate\": \"2026-10-03\",\n \"saleId\": \"sale_example_1\",\n \"reason\": \"06\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"sale": {
"id": "sale_example_2",
"type": "credit_note",
"status": "completed",
"traderInvoiceNumber": "CN-2026-0001",
"saleDate": "2026-10-03",
"paymentTypeCode": "01",
"customer": {
"name": "Example Customer Ltd",
"pin": "P000000000X",
"phone": null,
"email": null
},
"lines": [
{
"id": "line_example_1",
"itemId": "itm_example_1",
"name": "500ml Cooking Oil",
"description": "500ml Cooking Oil",
"quantity": -2,
"unitPrice": 3500,
"total": -7000,
"taxableAmount": -6034.48,
"taxAmount": -965.52,
"taxRate": 16,
"taxTypeCode": "B"
}
],
"totals": {
"total": -7000,
"taxableAmount": -6034.48,
"taxAmount": -965.52
},
"receipt": {
"cuInvoiceNo": "KRACU0000000000/13 NC",
"receiptNumber": 13,
"receiptLabel": "NC",
"scuId": "KRACU0000000000",
"scuDate": "02/10/2026",
"scuTime": "10:15:30",
"totalReceiptCounter": "13",
"signature": "AAAA-BBBB-CCCC",
"internalData": "DDDD-EEEE-FFFF",
"verificationUrl": "https://etims-verify.example/receipt?id=EXAMPLE",
"originalCuInvoiceNo": "KRACU0000000000/12 NS"
},
"originalSaleId": "sale_example_1",
"error": null,
"callback": null
}
}
}Authorizations
Your API key, for example cmp_sk_test_xxxxxxxxxxxxxxxxxxxxxxxx. Create one on the Integrations page of the compliance dashboard.
Headers
A unique value you choose for this document, 8 to 128 characters: letters, digits and . _ : -. Repeating the request with the same key returns the original result instead of filing a second document. Strongly recommended.
8 - 128^[A-Za-z0-9._:-]+$Body
Your own number for the credit note.
50As YYYY-MM-DD.
The id of the accepted sale to reverse.
01 missing quantity, 02 missing data, 03 damaged, 04 wasted, 05 raw material shortage, 06 refund.
01, 02, 03, 04, 05, 06 Where to send the result. An absolute https URL on a public host, with no credentials in it. See Result callbacks.
2048The business to act for. Required for organisation-wide keys; omit it for a business-bound key. List the ids you can use with GET /v1/businesses.
Response
A repeat of an earlier request. The original credit note is returned and nothing is filed again.
Show child attributes
Show child attributes