curl --request POST \
--url https://thirdparty.qonto.com/v2/credit_notes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoice_id": "4d5418bb-bd0d-4df4-865c-c07afab8bb48",
"issue_date": "2024-01-15",
"reason": "Product returned",
"currency": "EUR",
"items": [
{
"title": "<string>",
"quantity": "0.5",
"unit_price": {
"value": "<string>",
"currency": "<string>"
},
"vat_rate": "0.1",
"description": "<string>",
"unit": "meter",
"vat_exemption_reason": "N1",
"discount": {
"type": "percentage",
"value": "0.1"
}
}
],
"number": "CN-2024-001",
"terms_and_conditions": "<string>",
"contact_email": "contact@company.com",
"discount": {
"type": "percentage",
"value": "0.1"
},
"welfare_fund": {
"type": "TC01",
"rate": "0.04"
},
"withholding_tax": {
"reason": "RF01",
"rate": "0.20",
"payment_reason": "<string>"
},
"stamp_duty_amount": "2.00"
}
'import requests
url = "https://thirdparty.qonto.com/v2/credit_notes"
payload = {
"invoice_id": "4d5418bb-bd0d-4df4-865c-c07afab8bb48",
"issue_date": "2024-01-15",
"reason": "Product returned",
"currency": "EUR",
"items": [
{
"title": "<string>",
"quantity": "0.5",
"unit_price": {
"value": "<string>",
"currency": "<string>"
},
"vat_rate": "0.1",
"description": "<string>",
"unit": "meter",
"vat_exemption_reason": "N1",
"discount": {
"type": "percentage",
"value": "0.1"
}
}
],
"number": "CN-2024-001",
"terms_and_conditions": "<string>",
"contact_email": "contact@company.com",
"discount": {
"type": "percentage",
"value": "0.1"
},
"welfare_fund": {
"type": "TC01",
"rate": "0.04"
},
"withholding_tax": {
"reason": "RF01",
"rate": "0.20",
"payment_reason": "<string>"
},
"stamp_duty_amount": "2.00"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invoice_id: '4d5418bb-bd0d-4df4-865c-c07afab8bb48',
issue_date: '2024-01-15',
reason: 'Product returned',
currency: 'EUR',
items: [
{
title: '<string>',
quantity: '0.5',
unit_price: {value: '<string>', currency: '<string>'},
vat_rate: '0.1',
description: '<string>',
unit: 'meter',
vat_exemption_reason: 'N1',
discount: {type: 'percentage', value: '0.1'}
}
],
number: 'CN-2024-001',
terms_and_conditions: '<string>',
contact_email: 'contact@company.com',
discount: {type: 'percentage', value: '0.1'},
welfare_fund: {type: 'TC01', rate: '0.04'},
withholding_tax: {reason: 'RF01', rate: '0.20', payment_reason: '<string>'},
stamp_duty_amount: '2.00'
})
};
fetch('https://thirdparty.qonto.com/v2/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://thirdparty.qonto.com/v2/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([
'invoice_id' => '4d5418bb-bd0d-4df4-865c-c07afab8bb48',
'issue_date' => '2024-01-15',
'reason' => 'Product returned',
'currency' => 'EUR',
'items' => [
[
'title' => '<string>',
'quantity' => '0.5',
'unit_price' => [
'value' => '<string>',
'currency' => '<string>'
],
'vat_rate' => '0.1',
'description' => '<string>',
'unit' => 'meter',
'vat_exemption_reason' => 'N1',
'discount' => [
'type' => 'percentage',
'value' => '0.1'
]
]
],
'number' => 'CN-2024-001',
'terms_and_conditions' => '<string>',
'contact_email' => 'contact@company.com',
'discount' => [
'type' => 'percentage',
'value' => '0.1'
],
'welfare_fund' => [
'type' => 'TC01',
'rate' => '0.04'
],
'withholding_tax' => [
'reason' => 'RF01',
'rate' => '0.20',
'payment_reason' => '<string>'
],
'stamp_duty_amount' => '2.00'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://thirdparty.qonto.com/v2/credit_notes"
payload := strings.NewReader("{\n \"invoice_id\": \"4d5418bb-bd0d-4df4-865c-c07afab8bb48\",\n \"issue_date\": \"2024-01-15\",\n \"reason\": \"Product returned\",\n \"currency\": \"EUR\",\n \"items\": [\n {\n \"title\": \"<string>\",\n \"quantity\": \"0.5\",\n \"unit_price\": {\n \"value\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"vat_rate\": \"0.1\",\n \"description\": \"<string>\",\n \"unit\": \"meter\",\n \"vat_exemption_reason\": \"N1\",\n \"discount\": {\n \"type\": \"percentage\",\n \"value\": \"0.1\"\n }\n }\n ],\n \"number\": \"CN-2024-001\",\n \"terms_and_conditions\": \"<string>\",\n \"contact_email\": \"contact@company.com\",\n \"discount\": {\n \"type\": \"percentage\",\n \"value\": \"0.1\"\n },\n \"welfare_fund\": {\n \"type\": \"TC01\",\n \"rate\": \"0.04\"\n },\n \"withholding_tax\": {\n \"reason\": \"RF01\",\n \"rate\": \"0.20\",\n \"payment_reason\": \"<string>\"\n },\n \"stamp_duty_amount\": \"2.00\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://thirdparty.qonto.com/v2/credit_notes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invoice_id\": \"4d5418bb-bd0d-4df4-865c-c07afab8bb48\",\n \"issue_date\": \"2024-01-15\",\n \"reason\": \"Product returned\",\n \"currency\": \"EUR\",\n \"items\": [\n {\n \"title\": \"<string>\",\n \"quantity\": \"0.5\",\n \"unit_price\": {\n \"value\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"vat_rate\": \"0.1\",\n \"description\": \"<string>\",\n \"unit\": \"meter\",\n \"vat_exemption_reason\": \"N1\",\n \"discount\": {\n \"type\": \"percentage\",\n \"value\": \"0.1\"\n }\n }\n ],\n \"number\": \"CN-2024-001\",\n \"terms_and_conditions\": \"<string>\",\n \"contact_email\": \"contact@company.com\",\n \"discount\": {\n \"type\": \"percentage\",\n \"value\": \"0.1\"\n },\n \"welfare_fund\": {\n \"type\": \"TC01\",\n \"rate\": \"0.04\"\n },\n \"withholding_tax\": {\n \"reason\": \"RF01\",\n \"rate\": \"0.20\",\n \"payment_reason\": \"<string>\"\n },\n \"stamp_duty_amount\": \"2.00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v2/credit_notes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"invoice_id\": \"4d5418bb-bd0d-4df4-865c-c07afab8bb48\",\n \"issue_date\": \"2024-01-15\",\n \"reason\": \"Product returned\",\n \"currency\": \"EUR\",\n \"items\": [\n {\n \"title\": \"<string>\",\n \"quantity\": \"0.5\",\n \"unit_price\": {\n \"value\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"vat_rate\": \"0.1\",\n \"description\": \"<string>\",\n \"unit\": \"meter\",\n \"vat_exemption_reason\": \"N1\",\n \"discount\": {\n \"type\": \"percentage\",\n \"value\": \"0.1\"\n }\n }\n ],\n \"number\": \"CN-2024-001\",\n \"terms_and_conditions\": \"<string>\",\n \"contact_email\": \"contact@company.com\",\n \"discount\": {\n \"type\": \"percentage\",\n \"value\": \"0.1\"\n },\n \"welfare_fund\": {\n \"type\": \"TC01\",\n \"rate\": \"0.04\"\n },\n \"withholding_tax\": {\n \"reason\": \"RF01\",\n \"rate\": \"0.20\",\n \"payment_reason\": \"<string>\"\n },\n \"stamp_duty_amount\": \"2.00\"\n}"
response = http.request(request)
puts response.read_bodyCreate a credit note
OAuth scope: client_invoice.write
Creates a credit note linked to an existing invoice for the authenticated organization.
- The cumulative total of all credit notes for an invoice cannot exceed the invoice amount.
- If the credit note amount equals the invoice amount, the invoice will be automatically canceled.
- Credit notes cannot be created for partial (progress) invoices.
curl --request POST \
--url https://thirdparty.qonto.com/v2/credit_notes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"invoice_id": "4d5418bb-bd0d-4df4-865c-c07afab8bb48",
"issue_date": "2024-01-15",
"reason": "Product returned",
"currency": "EUR",
"items": [
{
"title": "<string>",
"quantity": "0.5",
"unit_price": {
"value": "<string>",
"currency": "<string>"
},
"vat_rate": "0.1",
"description": "<string>",
"unit": "meter",
"vat_exemption_reason": "N1",
"discount": {
"type": "percentage",
"value": "0.1"
}
}
],
"number": "CN-2024-001",
"terms_and_conditions": "<string>",
"contact_email": "contact@company.com",
"discount": {
"type": "percentage",
"value": "0.1"
},
"welfare_fund": {
"type": "TC01",
"rate": "0.04"
},
"withholding_tax": {
"reason": "RF01",
"rate": "0.20",
"payment_reason": "<string>"
},
"stamp_duty_amount": "2.00"
}
'import requests
url = "https://thirdparty.qonto.com/v2/credit_notes"
payload = {
"invoice_id": "4d5418bb-bd0d-4df4-865c-c07afab8bb48",
"issue_date": "2024-01-15",
"reason": "Product returned",
"currency": "EUR",
"items": [
{
"title": "<string>",
"quantity": "0.5",
"unit_price": {
"value": "<string>",
"currency": "<string>"
},
"vat_rate": "0.1",
"description": "<string>",
"unit": "meter",
"vat_exemption_reason": "N1",
"discount": {
"type": "percentage",
"value": "0.1"
}
}
],
"number": "CN-2024-001",
"terms_and_conditions": "<string>",
"contact_email": "contact@company.com",
"discount": {
"type": "percentage",
"value": "0.1"
},
"welfare_fund": {
"type": "TC01",
"rate": "0.04"
},
"withholding_tax": {
"reason": "RF01",
"rate": "0.20",
"payment_reason": "<string>"
},
"stamp_duty_amount": "2.00"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
invoice_id: '4d5418bb-bd0d-4df4-865c-c07afab8bb48',
issue_date: '2024-01-15',
reason: 'Product returned',
currency: 'EUR',
items: [
{
title: '<string>',
quantity: '0.5',
unit_price: {value: '<string>', currency: '<string>'},
vat_rate: '0.1',
description: '<string>',
unit: 'meter',
vat_exemption_reason: 'N1',
discount: {type: 'percentage', value: '0.1'}
}
],
number: 'CN-2024-001',
terms_and_conditions: '<string>',
contact_email: 'contact@company.com',
discount: {type: 'percentage', value: '0.1'},
welfare_fund: {type: 'TC01', rate: '0.04'},
withholding_tax: {reason: 'RF01', rate: '0.20', payment_reason: '<string>'},
stamp_duty_amount: '2.00'
})
};
fetch('https://thirdparty.qonto.com/v2/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://thirdparty.qonto.com/v2/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([
'invoice_id' => '4d5418bb-bd0d-4df4-865c-c07afab8bb48',
'issue_date' => '2024-01-15',
'reason' => 'Product returned',
'currency' => 'EUR',
'items' => [
[
'title' => '<string>',
'quantity' => '0.5',
'unit_price' => [
'value' => '<string>',
'currency' => '<string>'
],
'vat_rate' => '0.1',
'description' => '<string>',
'unit' => 'meter',
'vat_exemption_reason' => 'N1',
'discount' => [
'type' => 'percentage',
'value' => '0.1'
]
]
],
'number' => 'CN-2024-001',
'terms_and_conditions' => '<string>',
'contact_email' => 'contact@company.com',
'discount' => [
'type' => 'percentage',
'value' => '0.1'
],
'welfare_fund' => [
'type' => 'TC01',
'rate' => '0.04'
],
'withholding_tax' => [
'reason' => 'RF01',
'rate' => '0.20',
'payment_reason' => '<string>'
],
'stamp_duty_amount' => '2.00'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://thirdparty.qonto.com/v2/credit_notes"
payload := strings.NewReader("{\n \"invoice_id\": \"4d5418bb-bd0d-4df4-865c-c07afab8bb48\",\n \"issue_date\": \"2024-01-15\",\n \"reason\": \"Product returned\",\n \"currency\": \"EUR\",\n \"items\": [\n {\n \"title\": \"<string>\",\n \"quantity\": \"0.5\",\n \"unit_price\": {\n \"value\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"vat_rate\": \"0.1\",\n \"description\": \"<string>\",\n \"unit\": \"meter\",\n \"vat_exemption_reason\": \"N1\",\n \"discount\": {\n \"type\": \"percentage\",\n \"value\": \"0.1\"\n }\n }\n ],\n \"number\": \"CN-2024-001\",\n \"terms_and_conditions\": \"<string>\",\n \"contact_email\": \"contact@company.com\",\n \"discount\": {\n \"type\": \"percentage\",\n \"value\": \"0.1\"\n },\n \"welfare_fund\": {\n \"type\": \"TC01\",\n \"rate\": \"0.04\"\n },\n \"withholding_tax\": {\n \"reason\": \"RF01\",\n \"rate\": \"0.20\",\n \"payment_reason\": \"<string>\"\n },\n \"stamp_duty_amount\": \"2.00\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://thirdparty.qonto.com/v2/credit_notes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"invoice_id\": \"4d5418bb-bd0d-4df4-865c-c07afab8bb48\",\n \"issue_date\": \"2024-01-15\",\n \"reason\": \"Product returned\",\n \"currency\": \"EUR\",\n \"items\": [\n {\n \"title\": \"<string>\",\n \"quantity\": \"0.5\",\n \"unit_price\": {\n \"value\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"vat_rate\": \"0.1\",\n \"description\": \"<string>\",\n \"unit\": \"meter\",\n \"vat_exemption_reason\": \"N1\",\n \"discount\": {\n \"type\": \"percentage\",\n \"value\": \"0.1\"\n }\n }\n ],\n \"number\": \"CN-2024-001\",\n \"terms_and_conditions\": \"<string>\",\n \"contact_email\": \"contact@company.com\",\n \"discount\": {\n \"type\": \"percentage\",\n \"value\": \"0.1\"\n },\n \"welfare_fund\": {\n \"type\": \"TC01\",\n \"rate\": \"0.04\"\n },\n \"withholding_tax\": {\n \"reason\": \"RF01\",\n \"rate\": \"0.20\",\n \"payment_reason\": \"<string>\"\n },\n \"stamp_duty_amount\": \"2.00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://thirdparty.qonto.com/v2/credit_notes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"invoice_id\": \"4d5418bb-bd0d-4df4-865c-c07afab8bb48\",\n \"issue_date\": \"2024-01-15\",\n \"reason\": \"Product returned\",\n \"currency\": \"EUR\",\n \"items\": [\n {\n \"title\": \"<string>\",\n \"quantity\": \"0.5\",\n \"unit_price\": {\n \"value\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"vat_rate\": \"0.1\",\n \"description\": \"<string>\",\n \"unit\": \"meter\",\n \"vat_exemption_reason\": \"N1\",\n \"discount\": {\n \"type\": \"percentage\",\n \"value\": \"0.1\"\n }\n }\n ],\n \"number\": \"CN-2024-001\",\n \"terms_and_conditions\": \"<string>\",\n \"contact_email\": \"contact@company.com\",\n \"discount\": {\n \"type\": \"percentage\",\n \"value\": \"0.1\"\n },\n \"welfare_fund\": {\n \"type\": \"TC01\",\n \"rate\": \"0.04\"\n },\n \"withholding_tax\": {\n \"reason\": \"RF01\",\n \"rate\": \"0.20\",\n \"payment_reason\": \"<string>\"\n },\n \"stamp_duty_amount\": \"2.00\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authorization header: Bearer <token>, where <token> is the access token received from the authorization server at the end of the OAuth 2.0 flow.
Headers
Required only for Sandbox API requests; to get one, please sign up to the Developer Portal.
Body
ID of the invoice to create the credit note for.
"4d5418bb-bd0d-4df4-865c-c07afab8bb48"
Date the credit note was issued. The format should be YYYY-MM-DD.
"2024-01-15"
Reason for issuing the credit note.
500"Product returned"
Currency for the credit note. Trigram following ISO 4217.
"EUR"
Line items for the credit note. Quantities should be positive; the system will negate them.
Show child attributes
Show child attributes
Credit note number. Must be unique within the organization and is:
- required if automatic numbering is disabled for the authenticated organization (default setting);
- optional if automatic numbering is enabled for the authenticated organization. However, if provided, it will be used as the credit note number.
40"CN-2024-001"
Additional notes added by the credit note's initiator.
525Contact email for the credit note.
"contact@company.com"
Global discount applied to the entire credit note. This discount is applied to the sum of all items (after item-level discounts, if any).
Show child attributes
Show child attributes
Italian-specific welfare fund details.
Show child attributes
Show child attributes
Italian and Spanish-specific withholding tax details.
Show child attributes
Show child attributes
Italian-specific stamp duty amount.
"2.00"
Response
Returns the credit note created.
Show child attributes
Show child attributes
Was this page helpful?