Skip to main content

Correct invoices

International accounting tax standards agree that once an invoice has been issued, it can no longer be modified in order to avoid inconsistencies in tax filings and prevent fraud.

The only fully law-compliant way of correcting invoices is by canceling the original invoice with an equivalent credit note and issuing a new invoice with the corrected data.

Canceling out an invoice with a credit note using the Transactions API is as simple as sending the same parameters processor and processor_id that you used when recording the sale in Quaderno. These parameters represent your platform’s name and internal transaction ID.

Let’s review an example. Let’s say your business sold a SaaS subscription. You would then send the sale data to Quaderno via a POST call to the /transactions endpoint:

curl --request POST \
--url https://ACCOUNT_NAME.quadernoapp.com/api/transactions
--header 'Authorization: Basic ENCODED_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"type": "sale",
"currency": "GBP",
"customer": {
"first_name": "Alex",
"last_name": "Wick",
"street_line_1": "67 Church Lane",
"city": "London",
"postal_code": "E94 7RT",
"country": "GB"
},
"items": [
{
"description": "Simple Software",
"amount": 9.90,
"tax": {
"country": "GB",
"rate": 20.0,
"tax_code": "eservice".
}
}
],
"payment": {
"method": "credit_card",
"processor": "yourPaymentProcessorName",
"processor_id": "yourPaymentProcessorId"
},
"evidence": {
"billing_country": "GB",
"ip_address": "255.255.255.255",
"bank_country": "GB"
},
"processor": "yourSalesPlatformName",
"processor_id": "yourSalesPlatformTransactionId"
}'

After a few days, your customer contacts you to correct the invoice, as they are a business and their Tax ID is missing.

To do that, you have to cancel out the invoice with a credit note and reissue a new invoice with the missing data.

To create the credit note, send a POST to /transactions with a type: refund, using the same processor and processor_id parameters that you sent when recording your sale:

{
"type": "refund",
// Use the values from the recorded sale to be refunded
"processor": "yourSalesPlatformName",
"processor_id": "yourSalesPlatformTransactionId",
"items": [
{
"description": "Simple Software",
"amount": 9.90,
}
],
// We send the `contact.id` we got from recording the sale’s response
"customer": { "id": 229575 }
}

The corresponding credit note will be assigned a processor_id automatically, appending the Unix timestamp to the invoice’s processor_id being canceled.

Then you just need to issue the new invoice with the missing tax ID, and a new tax rate, as reverse charge now applies. Note this new invoice can NOT have the same processor_id as the original invoice, but you should use the original payment processor_id as there is no new payment involved:

{
"type": "sale",
"currency": "GBP",
"customer": {
"first_name": "Alex",
"last_name": "Wick",
"street_line_1": "67 Church Lane",
"city": "London",
"postal_code": "E94 7RT",
"country": "GB",
"tax_id": "IE111111111"
},
"evidence": {
"billing_country": "GB",
"ip_address": "255.255.255.255",
"bank_country": "GB"
},
"items": [
{
"description": "Simple Software",
"amount": 9.90,
"tax": {
"country": "GB",
"rate": 0.0,
"tax_code": "eservice"
}
}
],
"payment": {
"method": "credit_card",
"processor": "originalPaymentProcessorName",
"processor_id": "originalPaymentProcessorId"
},
"processor": "yourSalesPlatformName",
"processor_id": "aNewSalesPlatformTransactionId"
}

You can check examples of the endpoint’s response in the corresponding API reference.