Skip to main content
POST
/
v2
/
credit_notes
Create a credit note
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_body
{ "credit_note": { "id": "4d5418bb-bd0d-4df4-865c-c07afab8bb48", "invoice_id": "4d5418bb-bd0d-4df4-865c-c07afab8bb48", "attachment_id": "4d5418bb-bd0d-4df4-865c-c07afab8bb48", "issue_date": "2022-03-01", "invoice_issue_date": "2022-03-02", "number": "INV001", "terms_and_conditions": "This is an example.", "header": "This is an example.", "footer": "This is an example.", "vat_amount": { "value": "0.51", "currency": "EUR" }, "vat_amount_cents": 51, "total_amount": { "value": "12.52", "currency": "EUR" }, "total_amount_cents": 1252, "currency": "EUR", "created_at": "2022-03-04T17:58:30+02:00", "finalized_at": "2022-03-04T17:58:30+02:00", "contact_email": "contact@qonto.com", "invoice_url": "https://pay.qonto.com/invoices/00000000-0000-0000-0000-000000000000", "welfare_fund": { "type": "TC01", "rate": "0.0001" }, "withholding_tax": { "reason": "RF01", "rate": "0.01", "payment_reason": "<string>", "amount": "1.00" }, "stamp_duty_amount": "1.00", "items": [ { "title": "Plastic tables", "description": "Plastic tables for McDonald’s restaurants", "quantity": "1.5", "unit": "meter", "unit_price": { "value": "10.0", "currency": "EUR" }, "unit_price_cents": 1000, "vat_rate": "0.1", "discount": { "type": "percentage", "value": "0.1", "amount": { "value": "120", "currency": "EUR" } }, "total_vat": { "value": "120", "currency": "EUR" }, "total_vat_cents": 12000, "total_amount": { "value": "300.50", "currency": "EUR" }, "total_amount_cents": 30050, "subtotal": { "value": "120", "currency": "EUR" }, "subtotal_cents": 12000 } ], "client": { "id": "33v418bb-bd0d-4df4-865c-c07afab8bb48", "name": "McDonald's", "first_name": "Jane", "last_name": "Doe", "type": "individual", "email": "client@qonto.com", "vat_number": "FR32123456789", "tax_identification_number": "123456789", "address": "1 place de l’Opéra", "city": "Paris", "zip_code": "75009", "province_code": "<string>", "country_code": "fr", "recipient_code": "<string>", "locale": "fr", "billing_address": { "street_address": "123 Main Street", "city": "Paris", "zip_code": "75009", "province_code": "<string>", "country_code": "FR" }, "delivery_address": { "street_address": "123 Main Street", "city": "Paris", "zip_code": "75009", "province_code": "<string>", "country_code": "FR" } }, "einvoicing_lifecycle_events": [ { "status_code": 200, "reason": "DOUBLE FACTURE", "reason_message": "I already received this invoice", "timestamp": "2024-12-04T11:05:16.4497Z" } ] } }

Authorizations

Authorization
string
header
required

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

X-Qonto-Staging-Token
string

Required only for Sandbox API requests; to get one, please sign up to the Developer Portal.

Body

application/json
invoice_id
string<uuid>
required

ID of the invoice to create the credit note for.

Example:

"4d5418bb-bd0d-4df4-865c-c07afab8bb48"

issue_date
string<date>
required

Date the credit note was issued. The format should be YYYY-MM-DD.

Example:

"2024-01-15"

reason
string
required

Reason for issuing the credit note.

Maximum string length: 500
Example:

"Product returned"

currency
string
required

Currency for the credit note. Trigram following ISO 4217.

Example:

"EUR"

items
object[]
required

Line items for the credit note. Quantities should be positive; the system will negate them.

number
string

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.
Maximum string length: 40
Example:

"CN-2024-001"

terms_and_conditions
string

Additional notes added by the credit note's initiator.

Maximum string length: 525
contact_email
string<email>

Contact email for the credit note.

Example:

"contact@company.com"

discount
object

Global discount applied to the entire credit note. This discount is applied to the sum of all items (after item-level discounts, if any).

welfare_fund
object

Italian-specific welfare fund details.

withholding_tax
object

Italian and Spanish-specific withholding tax details.

stamp_duty_amount
string

Italian-specific stamp duty amount.

Example:

"2.00"

Response

Returns the credit note created.

credit_note
object
required