Invoices
With the default autoVat=true the API determines the VAT rate from your company's VAT/OSS registration plus the client's country and VAT number (domestic / reverse-charge / OSS / export). Invoice numbers are gapless and share the same sequence as the panel. There is NO invoice deletion via API — only cancellation (the number stays in sequence).
| Scenario | Rate | Note |
|---|---|---|
| Company not VAT-registered | 0 | Manual taxRate>0 → 422 rejected |
| Same country (domestic) | Seller-country rate | e.g. EE 24% |
| Intra-EU B2B (with VAT no) | 0 | Reverse charge — vatNote automatic |
| Intra-EU B2C + OSS registered | Buyer-country rate | e.g. DE 19% |
| Intra-EU B2C, no OSS | Seller-country rate | |
| Sale outside the EU | 0 | Export exemption — vatNote automatic |
Endpoints
POST
/invoicesScope: write:invoicesBilled (per-invoice meter)
Issues an invoice. autoVat is on by default; clientCountry becomes required.
Example request
curl -X POST -H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
https://corpenza.com/api/external/accounting/invoices -d '{
"clientName": "Berlin GmbH",
"clientCountry": "DE",
"clientVatNumber": "DE123456789",
"items": [
{ "description": "Consulting", "quantity": 2, "unitPrice": 250 }
]
}'Example response
{
"id": "inv_...",
"invoiceNumber": "CRP-202606-0042",
"taxRate": 0,
"total": 500,
"vatNote": "Reverse Charge - ...",
"vatReason": "Intra-EU B2B — Reverse Charge"
}GET
/invoicesScope: read:invoicesInvoice list (status, from, to, page, limit filters).
Example request
curl -H "Authorization: Bearer $API_KEY" \
"https://corpenza.com/api/external/accounting/invoices?status=SENT&page=1&limit=20"GET
/invoices/{id}Scope: read:invoicesSingle invoice detail (items + payments).
POST
/invoices/{id}/cancelScope: write:invoicesCancels the invoice (no deletion; number stays in sequence). PAID cannot be cancelled (409).