Skip to content

Invoices and payments

Invoices with lines, VAT breakdown and payment state: drafts, issue and payments.

Version v1.1, updated

On this page

An invoice starts as a draft that BIRP computes from its lines and their tax codes. Once issued, it has its number and never changes, and payments record what was paid.

Fields

Send says the field is in responses. Receive says a write accepts it; a reference is sent as an object, such as category for category_id. Totals, VAT, numbers and statuses are computed by BIRP and never received.

Invoice
FieldTypeRequiredReceive (inbound)Send (outbound)Notes
amount_duestringYesNoYesTotal minus amount_paid. Decimal string with two decimals.
amount_paidstringYesNoYesSum of the confirmed payments. Decimal string with two decimals.
buyerPartyYesNoYesBuyer, as printed on the invoice.
created_atstringYesNoYesCreation time. ISO 8601 date and time in UTC, with millisecond precision and a Z suffix.
currencystringYesYesYesCurrency of the invoice.
customer_idstring (uuid) or nullNoYesYesCustomer record of the buyer.
due_atstring or nullNoYesYesDue date. ISO 8601 date and time in UTC, with millisecond precision and a Z suffix.
external_idsarray of ExternalIdYesNoYesIdentifiers of the invoice in external systems.
idstring (uuid)YesNoYesInvoice identifier.
issued_atstring or nullNoYesYesIssue date. ISO 8601 date and time in UTC, with millisecond precision and a Z suffix.
legal_footerstring or nullNoNoYesLegal footer printed on the invoice.
linesarray of InvoiceLineYesYesYesLines, in document order.
notesstring or nullNoYesYesNotes printed on the invoice.
numberstring or nullNoNoYesInvoice number. Null for a draft written through the API: it gets the next number of the series when it is issued.
order_idstring (uuid) or nullNoYesYesOrder the invoice was made from.
paid_atstring or nullNoNoYesDate the invoice was marked paid. ISO 8601 date and time in UTC, with millisecond precision and a Z suffix.
paymentInvoicePaymentTermsYesNoYesPayment terms printed on the invoice.
payment_statusstringYesNoYesDerived from the confirmed payments of the invoice. One of: unpaid, partially_paid, paid, overpaid.
related_invoice_idstring (uuid) or nullNoNoYesInvoice this document corrects (credit notes).
sellerPartyYesNoYesSeller, as printed on the invoice.
statusstringYesNoYesStatus of the document. One of: draft, issued, sent, partially_paid, paid, overdue, cancelled, refunded.
subtotalstringYesNoYesTotal excluding VAT. Decimal string with two decimals.
supplied_atstring or nullNoYesYesSupply date. ISO 8601 date and time in UTC, with millisecond precision and a Z suffix.
totalstringYesNoYesTotal including VAT. Decimal string with two decimals.
total_discountstringYesNoYesTotal discount. Decimal string with two decimals.
total_vatstringYesNoYesTotal VAT. Decimal string with two decimals.
typestringYesNoYesDocument type. One of: invoice, credit_note, proforma.
updated_atstringYesNoYesLast change, including payments recorded against the invoice. ISO 8601 date and time in UTC, with millisecond precision and a Z suffix.
vat_breakdownarray of VatBreakdownEntryYesNoYesTotals per VAT rate.
vat_exemption_reasonstring or nullNoYesYesVAT exemption of the document; null when none. One of: intra_community, export, reverse_charge, small_business, other.
vat_exemption_textstring or nullNoYesYesExemption text printed on the invoice.
Invoice line
FieldTypeRequiredReceive (inbound)Send (outbound)Notes
descriptionstringYesYesYesLine description.
detailsstring or nullNoNoYesAdditional details.
discountstringYesNoYesDiscount amount. Decimal string with two decimals.
idstring (uuid)YesNoYesLine identifier. Line ids change when the invoice is edited in BIRP.
line_totalstringYesNoYesLine total excluding VAT. Decimal string with two decimals.
lot_numberstring or nullNoNoYesLot number.
positionnumberYesNoYesPosition of the line on the invoice.
product_idstring (uuid) or nullNoNoYesProduct of the line.
product_kindstring or nullNoNoYesKind of the product. One of: goods, finished_product.
quantitystringYesYesYesQuantity, decimal string with four decimals.
unitstringYesYesYesUnit of the quantity.
unit_pricestringYesYesYesUnit price excluding VAT, decimal string with four decimals.
vat_amountstringYesNoYesVAT amount of the line. Decimal string with two decimals.
vat_ratestringYesNoYesVAT rate in percent.
Payment
FieldTypeRequiredReceive (inbound)Send (outbound)Notes
amountstringYesYesYesDecimal string, two decimals.
created_atstringYesNoYesISO 8601 date and time in UTC.
currencystringYesNoYesThe invoice currency.
idstring (uuid)YesNoYes
invoice_idstring (uuid)YesNoYes
methodstringYesYesYesOne of: bank_transfer, cash, card, cheque, direct_debit, compensation, other.
paid_onstringYesYesYesYYYY-MM-DD.
referencestring or nullNoYesYes
statusstringYesNoYesPayments recorded through the API are confirmed.

List invoices

Lists the invoices of the company.

  • Scope: invoices:read.

  • Idempotency: a read; send it as often as you need.

GET/v1/invoices
List invoices

Parameters

limitinteger, in query
Page size, 1 to 200. Default 50.Default 50
cursorstring, in query
next_cursor of the previous page. Pages are ordered by id.Example opaque-cursor-example
updated_sincestring (date-time), in query
Only records changed at or after this time: ISO 8601 date and time with an offset or Z.Example 2026-09-01T00:00:00Z
external_idstring, in query
Identifier in an external system. Requires source.Example 1042
sourcestring, in query
External system of external_id, in lowercase. Requires external_id.Example woocommerce
statusstring, in query
Document status.One of draft, issued, sent, partially_paid, paid, overdue, cancelled, refundedExample issued
customer_idstring (uuid), in query
Invoices of one customer.Example 00000000-0000-4000-8000-000000000031
GET /v1/invoices
curl "https://api.birp.io/v1/invoices" \
  -H "Authorization: Bearer $BIRP_API_KEY"
200 OKJSON
{
  "data": [
    {
      "amount_due": "66.80",
      "amount_paid": "60.00",
      "buyer": {
        "address": "12 rue des Exemples",
        "city": "Paris",
        "country": "France",
        "name": "Epicerie Exemple SARL",
        "postal_code": "00000",
        "registration_number": "EXAMPLE-0002",
        "vat_number": "EXAMPLE-VAT-0002"
      },
      "created_at": "2026-09-28T09:12:40.000Z",
      "currency": "EUR",
      "customer_id": "00000000-0000-4000-8000-000000000031",
      "due_at": "2026-10-28T00:00:00.000Z",
      "external_ids": [],
      "id": "00000000-0000-4000-8000-000000000061",
      "issued_at": "2026-09-28T00:00:00.000Z",
      "legal_footer": null,
      "lines": [
        {
          "description": "White bread 500 g",
          "details": null,
          "discount": "0.00",
          "id": "00000000-0000-4000-8000-000000000071",
          "line_total": "64.00",
          "lot_number": "EXAMPLE-LOT-0001",
          "position": 0,
          "product_id": "00000000-0000-4000-8000-000000000012",
          "product_kind": "finished_product",
          "quantity": "20.0000",
          "unit": "pcs",
          "unit_price": "3.2000",
          "vat_amount": "12.80",
          "vat_rate": "20.00"
        },
        {
          "description": "Wheat flour 25 kg",
          "details": null,
          "discount": "0.00",
          "id": "00000000-0000-4000-8000-000000000072",
          "line_total": "50.00",
          "lot_number": null,
          "position": 1,
          "product_id": "00000000-0000-4000-8000-000000000011",
          "product_kind": "goods",
          "quantity": "4.0000",
          "unit": "kg",
          "unit_price": "12.5000",
          "vat_amount": "0.00",
          "vat_rate": "0.00"
        }
      ],
      "notes": null,
      "number": "EXAMPLE-INV-0098",
      "order_id": "00000000-0000-4000-8000-000000000051",
      "paid_at": null,
      "payment": {
        "bank_account": "EXAMPLE-IBAN-0001",
        "method": "bank_transfer",
        "reference": "EXAMPLE-INV-0098",
        "terms_days": 30
      },
      "payment_status": "partially_paid",
      "related_invoice_id": null,
      "seller": {
        "address": "Str. Exemplului 4",
        "city": "Chisinau",
        "country": "Moldova",
        "name": "Brutaria Exemplu SRL",
        "postal_code": "MD-0000",
        "registration_number": "EXAMPLE-0001",
        "vat_number": "EXAMPLE-VAT-0001"
      },
      "status": "issued",
      "subtotal": "114.00",
      "supplied_at": "2026-09-28T00:00:00.000Z",
      "total": "126.80",
      "total_discount": "0.00",
      "total_vat": "12.80",
      "type": "invoice",
      "updated_at": "2026-09-28T14:05:12.417Z",
      "vat_breakdown": [
        {
          "tax_code": "ZERO",
          "taxable_amount": "50.00",
          "vat_amount": "0.00",
          "vat_rate": "0.00"
        },
        {
          "tax_code": "STANDARD",
          "taxable_amount": "64.00",
          "vat_amount": "12.80",
          "vat_rate": "20.00"
        }
      ],
      "vat_exemption_reason": null,
      "vat_exemption_text": null
    },
    {
      "amount_due": "0.00",
      "amount_paid": "1500.00",
      "buyer": {
        "address": "Str. Exemplului 1",
        "city": "Chisinau",
        "country": "Moldova",
        "name": "Panificatie Exemplu SRL",
        "postal_code": "MD-0000",
        "registration_number": "EXAMPLE-0003",
        "vat_number": "EXAMPLE-VAT-0003"
      },
      "created_at": "2026-09-25T10:00:00.000Z",
      "currency": "MDL",
      "customer_id": "00000000-0000-4000-8000-000000000033",
      "due_at": "2026-10-10T00:00:00.000Z",
      "external_ids": [],
      "id": "00000000-0000-4000-8000-000000000062",
      "issued_at": "2026-09-25T00:00:00.000Z",
      "legal_footer": null,
      "lines": [
        {
          "description": "Wheat flour 25 kg",
          "details": null,
          "discount": "0.00",
          "id": "00000000-0000-4000-8000-000000000073",
          "line_total": "1250.00",
          "lot_number": null,
          "position": 0,
          "product_id": "00000000-0000-4000-8000-000000000011",
          "product_kind": "goods",
          "quantity": "100.0000",
          "unit": "kg",
          "unit_price": "12.5000",
          "vat_amount": "250.00",
          "vat_rate": "20.00"
        }
      ],
      "notes": null,
      "number": "EXAMPLE-INV-0097",
      "order_id": null,
      "paid_at": "2026-09-30T00:00:00.000Z",
      "payment": {
        "bank_account": "EXAMPLE-IBAN-0001",
        "method": "bank_transfer",
        "reference": "EXAMPLE-INV-0097",
        "terms_days": 15
      },
      "payment_status": "paid",
      "related_invoice_id": null,
      "seller": {
        "address": "Str. Exemplului 4",
        "city": "Chisinau",
        "country": "Moldova",
        "name": "Brutaria Exemplu SRL",
        "postal_code": "MD-0000",
        "registration_number": "EXAMPLE-0001",
        "vat_number": "EXAMPLE-VAT-0001"
      },
      "status": "issued",
      "subtotal": "1250.00",
      "supplied_at": "2026-09-25T00:00:00.000Z",
      "total": "1500.00",
      "total_discount": "0.00",
      "total_vat": "250.00",
      "type": "invoice",
      "updated_at": "2026-09-30T08:00:00.000Z",
      "vat_breakdown": [
        {
          "tax_code": "STANDARD",
          "taxable_amount": "1250.00",
          "vat_amount": "250.00",
          "vat_rate": "20.00"
        }
      ],
      "vat_exemption_reason": null,
      "vat_exemption_text": null
    }
  ],
  "meta": {
    "has_more": false,
    "limit": 50,
    "next_cursor": null
  }
}

Errors particular to this operation:

  • 422 validation_failed

Get an invoice

Returns one invoice of the company, with its lines, VAT breakdown and payment state.

  • Scope: invoices:read.

  • Idempotency: a read; send it as often as you need.

GET/v1/invoices/{id}
Get an invoice

Parameters

idrequiredstring (uuid), in path
Invoice identifier.Example 00000000-0000-4000-8000-000000000061
GET /v1/invoices/{id}
curl "https://api.birp.io/v1/invoices/00000000-0000-4000-8000-000000000061" \
  -H "Authorization: Bearer $BIRP_API_KEY"
200 OKJSON
{
  "data": {
    "amount_due": "66.80",
    "amount_paid": "60.00",
    "buyer": {
      "address": "12 rue des Exemples",
      "city": "Paris",
      "country": "France",
      "name": "Epicerie Exemple SARL",
      "postal_code": "00000",
      "registration_number": "EXAMPLE-0002",
      "vat_number": "EXAMPLE-VAT-0002"
    },
    "created_at": "2026-09-28T09:12:40.000Z",
    "currency": "EUR",
    "customer_id": "00000000-0000-4000-8000-000000000031",
    "due_at": "2026-10-28T00:00:00.000Z",
    "external_ids": [],
    "id": "00000000-0000-4000-8000-000000000061",
    "issued_at": "2026-09-28T00:00:00.000Z",
    "legal_footer": null,
    "lines": [
      {
        "description": "White bread 500 g",
        "details": null,
        "discount": "0.00",
        "id": "00000000-0000-4000-8000-000000000071",
        "line_total": "64.00",
        "lot_number": "EXAMPLE-LOT-0001",
        "position": 0,
        "product_id": "00000000-0000-4000-8000-000000000012",
        "product_kind": "finished_product",
        "quantity": "20.0000",
        "unit": "pcs",
        "unit_price": "3.2000",
        "vat_amount": "12.80",
        "vat_rate": "20.00"
      },
      {
        "description": "Wheat flour 25 kg",
        "details": null,
        "discount": "0.00",
        "id": "00000000-0000-4000-8000-000000000072",
        "line_total": "50.00",
        "lot_number": null,
        "position": 1,
        "product_id": "00000000-0000-4000-8000-000000000011",
        "product_kind": "goods",
        "quantity": "4.0000",
        "unit": "kg",
        "unit_price": "12.5000",
        "vat_amount": "0.00",
        "vat_rate": "0.00"
      }
    ],
    "notes": null,
    "number": "EXAMPLE-INV-0098",
    "order_id": "00000000-0000-4000-8000-000000000051",
    "paid_at": null,
    "payment": {
      "bank_account": "EXAMPLE-IBAN-0001",
      "method": "bank_transfer",
      "reference": "EXAMPLE-INV-0098",
      "terms_days": 30
    },
    "payment_status": "partially_paid",
    "related_invoice_id": null,
    "seller": {
      "address": "Str. Exemplului 4",
      "city": "Chisinau",
      "country": "Moldova",
      "name": "Brutaria Exemplu SRL",
      "postal_code": "MD-0000",
      "registration_number": "EXAMPLE-0001",
      "vat_number": "EXAMPLE-VAT-0001"
    },
    "status": "issued",
    "subtotal": "114.00",
    "supplied_at": "2026-09-28T00:00:00.000Z",
    "total": "126.80",
    "total_discount": "0.00",
    "total_vat": "12.80",
    "type": "invoice",
    "updated_at": "2026-09-28T14:05:12.417Z",
    "vat_breakdown": [
      {
        "tax_code": "ZERO",
        "taxable_amount": "50.00",
        "vat_amount": "0.00",
        "vat_rate": "0.00"
      },
      {
        "tax_code": "STANDARD",
        "taxable_amount": "64.00",
        "vat_amount": "12.80",
        "vat_rate": "20.00"
      }
    ],
    "vat_exemption_reason": null,
    "vat_exemption_text": null
  }
}

Errors particular to this operation:

  • 404 not_found

Create a draft invoice

Creates a draft invoice; BIRP computes the line totals, the VAT and the totals.

  • Scope: invoices:write.

  • Idempotency: Idempotency-Key required. See Idempotency.

Each line needs a tax_code from GET /v1/tax-codes. Totals and VAT are never accepted from you.

POST/v1/invoices
Create a draft invoice

Parameters

Idempotency-Keyrequiredstring, in header
Unique value for this request (for example a UUID), 1 to 128 printable ASCII characters. A retry with the same key and the same request gets the stored response for 24 hours, with Idempotency-Replayed: true; the same key with a different request answers 422 idempotency_key_reused. Required on POST, optional on PUT, PATCH and DELETE.Example 00000000-0000-4000-8000-0000000000a1

Request body

application/json

linesrequiredarray of InvoiceLineCreate
lines[].unitstring
Required without product. Left out with a product: its default unit.
lines[].productProductReference
A product of the company. Left out: a free line with a description.
lines[].quantityrequiredstring
Decimal string, at most four decimals, above zero.
lines[].tax_coderequiredstring
Tax code under the rules of the company's country, valid at the document date. GET /v1/tax-codes lists them. The rate, and so the VAT, comes from that code; an exempt code gives no VAT.
lines[].unit_pricerequiredstring
Unit price excluding VAT, decimal string, at most four decimals.
lines[].descriptionstring
Required without product. Left out with a product: its name.
notesstring | null
orderReference | null
An order of the company this invoice bills.
order.idstring (uuid)
BIRP id of the record.
order.sourcestring
External system of external_id, in lowercase.
order.external_idstring
Identifier of the record in an external system. Requires source.
currencystring
ISO 4217 code. Left out on create: the company base currency.
customerrequiredReference
The customer billed. Its name, address and fiscal ids become the buyer details of the invoice.
customer.idstring (uuid)
BIRP id of the record.
customer.sourcestring
External system of external_id, in lowercase.
customer.external_idstring
Identifier of the record in an external system. Requires source.
due_datestring | null
Due date, YYYY-MM-DD. Left out: issue date plus payment_terms_days, when given.
issue_datestring
Document date the VAT is computed for, YYYY-MM-DD. Left out: the company today. Issuing sets the issue date again (the issue_date sent then, or the company today) and recomputes the VAT for it.
supply_datestring | null
Date of supply, YYYY-MM-DD.
payment_terms_daysnumber | null
vat_exemption_textstring | null
Legal mention printed with the exemption.
vat_exemption_reasonstring | null
Why VAT is zero, for the whole invoice. A zero-rate code with a right to deduct (export, intra-community, reverse charge) needs the matching reason; otherwise the line answers tax_code_mismatch.One of intra_community, export, reverse_charge, small_business, other
POST /v1/invoices
curl -X POST "https://api.birp.io/v1/invoices" \
  -H "Authorization: Bearer $BIRP_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"currency":"EUR","customer":{"id":"00000000-0000-4000-8000-000000000031"},"issue_date":"2026-09-28","lines":[{"product":{"sku":"FP-BREAD-500"},"quantity":"20","tax_code":"STANDARD","unit_price":"3.20"},{"product":{"sku":"SP-FLOUR-25"},"quantity":"4","tax_code":"ZERO","unit_price":"12.50"}],"order":{"id":"00000000-0000-4000-8000-000000000051"},"payment_terms_days":30}'
201 CreatedJSON
{
  "data": {
    "amount_due": "126.80",
    "amount_paid": "0.00",
    "buyer": {
      "address": "12 rue des Exemples",
      "city": "Paris",
      "country": "France",
      "name": "Epicerie Exemple SARL",
      "postal_code": "00000",
      "registration_number": "EXAMPLE-0002",
      "vat_number": "EXAMPLE-VAT-0002"
    },
    "created_at": "2026-09-28T09:12:40.000Z",
    "currency": "EUR",
    "customer_id": "00000000-0000-4000-8000-000000000031",
    "due_at": null,
    "external_ids": [],
    "id": "00000000-0000-4000-8000-000000000061",
    "issued_at": "2026-09-28T00:00:00.000Z",
    "legal_footer": null,
    "lines": [
      {
        "description": "White bread 500 g",
        "details": null,
        "discount": "0.00",
        "id": "00000000-0000-4000-8000-000000000071",
        "line_total": "64.00",
        "lot_number": null,
        "position": 0,
        "product_id": "00000000-0000-4000-8000-000000000012",
        "product_kind": "finished_product",
        "quantity": "20.0000",
        "unit": "pcs",
        "unit_price": "3.2000",
        "vat_amount": "12.80",
        "vat_rate": "20.00"
      },
      {
        "description": "Wheat flour 25 kg",
        "details": null,
        "discount": "0.00",
        "id": "00000000-0000-4000-8000-000000000072",
        "line_total": "50.00",
        "lot_number": null,
        "position": 1,
        "product_id": "00000000-0000-4000-8000-000000000011",
        "product_kind": "goods",
        "quantity": "4.0000",
        "unit": "kg",
        "unit_price": "12.5000",
        "vat_amount": "0.00",
        "vat_rate": "0.00"
      }
    ],
    "notes": null,
    "number": null,
    "order_id": "00000000-0000-4000-8000-000000000051",
    "paid_at": null,
    "payment": {
      "bank_account": "EXAMPLE-IBAN-0001",
      "method": "bank_transfer",
      "reference": null,
      "terms_days": 30
    },
    "payment_status": "unpaid",
    "related_invoice_id": null,
    "seller": {
      "address": "Str. Exemplului 4",
      "city": "Chisinau",
      "country": "Moldova",
      "name": "Brutaria Exemplu SRL",
      "postal_code": "MD-0000",
      "registration_number": "EXAMPLE-0001",
      "vat_number": "EXAMPLE-VAT-0001"
    },
    "status": "draft",
    "subtotal": "114.00",
    "supplied_at": "2026-09-28T00:00:00.000Z",
    "total": "126.80",
    "total_discount": "0.00",
    "total_vat": "12.80",
    "type": "invoice",
    "updated_at": "2026-09-28T14:05:12.417Z",
    "vat_breakdown": [
      {
        "tax_code": "ZERO",
        "taxable_amount": "50.00",
        "vat_amount": "0.00",
        "vat_rate": "0.00"
      },
      {
        "tax_code": "STANDARD",
        "taxable_amount": "64.00",
        "vat_amount": "12.80",
        "vat_rate": "20.00"
      }
    ],
    "vat_exemption_reason": null,
    "vat_exemption_text": null
  }
}

Errors particular to this operation:

  • 422 company_profile_incomplete

  • 422 no_rule_for_date

  • 422 reference_not_found

  • 422 tax_code_mismatch

  • 422 tax_rules_unavailable

  • 422 validation_failed

Update a draft invoice

Changes a draft invoice and computes it again.

  • Scope: invoices:write.

  • Idempotency: Idempotency-Key accepted and recommended.

lines, when sent, replace all the lines. An issued invoice never changes.

PATCH/v1/invoices/{id}
Update a draft invoice

Parameters

Idempotency-Keystring, in header
Unique value for this request (for example a UUID), 1 to 128 printable ASCII characters. A retry with the same key and the same request gets the stored response for 24 hours, with Idempotency-Replayed: true; the same key with a different request answers 422 idempotency_key_reused. Required on POST, optional on PUT, PATCH and DELETE.Example 00000000-0000-4000-8000-0000000000a1
idrequiredstring (uuid), in path
Invoice identifier.Example 00000000-0000-4000-8000-000000000061

Request body

application/json

linesarray of InvoiceLineCreate
lines[].unitstring
Required without product. Left out with a product: its default unit.
lines[].productProductReference
A product of the company. Left out: a free line with a description.
lines[].quantityrequiredstring
Decimal string, at most four decimals, above zero.
lines[].tax_coderequiredstring
Tax code under the rules of the company's country, valid at the document date. GET /v1/tax-codes lists them. The rate, and so the VAT, comes from that code; an exempt code gives no VAT.
lines[].unit_pricerequiredstring
Unit price excluding VAT, decimal string, at most four decimals.
lines[].descriptionstring
Required without product. Left out with a product: its name.
notesstring | null
orderReference | null
An order of the company this invoice bills.
order.idstring (uuid)
BIRP id of the record.
order.sourcestring
External system of external_id, in lowercase.
order.external_idstring
Identifier of the record in an external system. Requires source.
currencystring
ISO 4217 code. Left out on create: the company base currency.
customerReference
Another record of the company: exactly one of id, or external_id with source.
customer.idstring (uuid)
BIRP id of the record.
customer.sourcestring
External system of external_id, in lowercase.
customer.external_idstring
Identifier of the record in an external system. Requires source.
due_datestring | null
Due date, YYYY-MM-DD. Left out: issue date plus payment_terms_days, when given.
issue_datestring
Document date the VAT is computed for, YYYY-MM-DD. Left out: the company today. Issuing sets the issue date again (the issue_date sent then, or the company today) and recomputes the VAT for it.
supply_datestring | null
Date of supply, YYYY-MM-DD.
payment_terms_daysnumber | null
vat_exemption_textstring | null
Legal mention printed with the exemption.
vat_exemption_reasonstring | null
Why VAT is zero, for the whole invoice. A zero-rate code with a right to deduct (export, intra-community, reverse charge) needs the matching reason; otherwise the line answers tax_code_mismatch.One of intra_community, export, reverse_charge, small_business, other
PATCH /v1/invoices/{id}
curl -X PATCH "https://api.birp.io/v1/invoices/00000000-0000-4000-8000-000000000061" \
  -H "Authorization: Bearer $BIRP_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"notes":"Thank you for your order","payment_terms_days":15}'
200 OKJSON
{
  "data": {
    "amount_due": "126.80",
    "amount_paid": "0.00",
    "buyer": {
      "address": "12 rue des Exemples",
      "city": "Paris",
      "country": "France",
      "name": "Epicerie Exemple SARL",
      "postal_code": "00000",
      "registration_number": "EXAMPLE-0002",
      "vat_number": "EXAMPLE-VAT-0002"
    },
    "created_at": "2026-09-28T09:12:40.000Z",
    "currency": "EUR",
    "customer_id": "00000000-0000-4000-8000-000000000031",
    "due_at": null,
    "external_ids": [],
    "id": "00000000-0000-4000-8000-000000000061",
    "issued_at": "2026-09-28T00:00:00.000Z",
    "legal_footer": null,
    "lines": [
      {
        "description": "White bread 500 g",
        "details": null,
        "discount": "0.00",
        "id": "00000000-0000-4000-8000-000000000071",
        "line_total": "64.00",
        "lot_number": null,
        "position": 0,
        "product_id": "00000000-0000-4000-8000-000000000012",
        "product_kind": "finished_product",
        "quantity": "20.0000",
        "unit": "pcs",
        "unit_price": "3.2000",
        "vat_amount": "12.80",
        "vat_rate": "20.00"
      },
      {
        "description": "Wheat flour 25 kg",
        "details": null,
        "discount": "0.00",
        "id": "00000000-0000-4000-8000-000000000072",
        "line_total": "50.00",
        "lot_number": null,
        "position": 1,
        "product_id": "00000000-0000-4000-8000-000000000011",
        "product_kind": "goods",
        "quantity": "4.0000",
        "unit": "kg",
        "unit_price": "12.5000",
        "vat_amount": "0.00",
        "vat_rate": "0.00"
      }
    ],
    "notes": null,
    "number": null,
    "order_id": "00000000-0000-4000-8000-000000000051",
    "paid_at": null,
    "payment": {
      "bank_account": "EXAMPLE-IBAN-0001",
      "method": "bank_transfer",
      "reference": null,
      "terms_days": 30
    },
    "payment_status": "unpaid",
    "related_invoice_id": null,
    "seller": {
      "address": "Str. Exemplului 4",
      "city": "Chisinau",
      "country": "Moldova",
      "name": "Brutaria Exemplu SRL",
      "postal_code": "MD-0000",
      "registration_number": "EXAMPLE-0001",
      "vat_number": "EXAMPLE-VAT-0001"
    },
    "status": "draft",
    "subtotal": "114.00",
    "supplied_at": "2026-09-28T00:00:00.000Z",
    "total": "126.80",
    "total_discount": "0.00",
    "total_vat": "12.80",
    "type": "invoice",
    "updated_at": "2026-09-28T14:05:12.417Z",
    "vat_breakdown": [
      {
        "tax_code": "ZERO",
        "taxable_amount": "50.00",
        "vat_amount": "0.00",
        "vat_rate": "0.00"
      },
      {
        "tax_code": "STANDARD",
        "taxable_amount": "64.00",
        "vat_amount": "12.80",
        "vat_rate": "20.00"
      }
    ],
    "vat_exemption_reason": null,
    "vat_exemption_text": null
  }
}

Errors particular to this operation:

  • 404 not_found

  • 409 invoice_issued

  • 422 company_profile_incomplete

  • 422 no_rule_for_date

  • 422 reference_not_found

  • 422 tax_code_mismatch

  • 422 tax_rules_unavailable

  • 422 validation_failed

Issue a draft invoice

Issues a draft invoice: it gets its number, its issue date, and its VAT for that date.

  • Scope: invoices:write.

  • Idempotency: Idempotency-Key required. See Idempotency.

Without issue_date, the current day of the company applies.

POST/v1/invoices/{id}/issue
Issue a draft invoice

Parameters

Idempotency-Keyrequiredstring, in header
Unique value for this request (for example a UUID), 1 to 128 printable ASCII characters. A retry with the same key and the same request gets the stored response for 24 hours, with Idempotency-Replayed: true; the same key with a different request answers 422 idempotency_key_reused. Required on POST, optional on PUT, PATCH and DELETE.Example 00000000-0000-4000-8000-0000000000a1
idrequiredstring (uuid), in path
Invoice identifier.Example 00000000-0000-4000-8000-000000000061

Request body

application/json

issue_datestring
Issue date, YYYY-MM-DD. The VAT is recomputed for it.
POST /v1/invoices/{id}/issue
curl -X POST "https://api.birp.io/v1/invoices/00000000-0000-4000-8000-000000000061/issue" \
  -H "Authorization: Bearer $BIRP_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"issue_date":"2026-09-28"}'
200 OKJSON
{
  "data": {
    "amount_due": "126.80",
    "amount_paid": "0.00",
    "buyer": {
      "address": "12 rue des Exemples",
      "city": "Paris",
      "country": "France",
      "name": "Epicerie Exemple SARL",
      "postal_code": "00000",
      "registration_number": "EXAMPLE-0002",
      "vat_number": "EXAMPLE-VAT-0002"
    },
    "created_at": "2026-09-28T09:12:40.000Z",
    "currency": "EUR",
    "customer_id": "00000000-0000-4000-8000-000000000031",
    "due_at": "2026-10-28T00:00:00.000Z",
    "external_ids": [],
    "id": "00000000-0000-4000-8000-000000000061",
    "issued_at": "2026-09-28T00:00:00.000Z",
    "legal_footer": null,
    "lines": [
      {
        "description": "White bread 500 g",
        "details": null,
        "discount": "0.00",
        "id": "00000000-0000-4000-8000-000000000071",
        "line_total": "64.00",
        "lot_number": null,
        "position": 0,
        "product_id": "00000000-0000-4000-8000-000000000012",
        "product_kind": "finished_product",
        "quantity": "20.0000",
        "unit": "pcs",
        "unit_price": "3.2000",
        "vat_amount": "12.80",
        "vat_rate": "20.00"
      },
      {
        "description": "Wheat flour 25 kg",
        "details": null,
        "discount": "0.00",
        "id": "00000000-0000-4000-8000-000000000072",
        "line_total": "50.00",
        "lot_number": null,
        "position": 1,
        "product_id": "00000000-0000-4000-8000-000000000011",
        "product_kind": "goods",
        "quantity": "4.0000",
        "unit": "kg",
        "unit_price": "12.5000",
        "vat_amount": "0.00",
        "vat_rate": "0.00"
      }
    ],
    "notes": null,
    "number": "EXAMPLE-INV-0098",
    "order_id": "00000000-0000-4000-8000-000000000051",
    "paid_at": null,
    "payment": {
      "bank_account": "EXAMPLE-IBAN-0001",
      "method": "bank_transfer",
      "reference": null,
      "terms_days": 30
    },
    "payment_status": "unpaid",
    "related_invoice_id": null,
    "seller": {
      "address": "Str. Exemplului 4",
      "city": "Chisinau",
      "country": "Moldova",
      "name": "Brutaria Exemplu SRL",
      "postal_code": "MD-0000",
      "registration_number": "EXAMPLE-0001",
      "vat_number": "EXAMPLE-VAT-0001"
    },
    "status": "issued",
    "subtotal": "114.00",
    "supplied_at": "2026-09-28T00:00:00.000Z",
    "total": "126.80",
    "total_discount": "0.00",
    "total_vat": "12.80",
    "type": "invoice",
    "updated_at": "2026-09-28T14:05:12.417Z",
    "vat_breakdown": [
      {
        "tax_code": "ZERO",
        "taxable_amount": "50.00",
        "vat_amount": "0.00",
        "vat_rate": "0.00"
      },
      {
        "tax_code": "STANDARD",
        "taxable_amount": "64.00",
        "vat_amount": "12.80",
        "vat_rate": "20.00"
      }
    ],
    "vat_exemption_reason": null,
    "vat_exemption_text": null
  }
}

Errors particular to this operation:

  • 404 not_found

  • 409 invoice_issued

  • 409 numbering_conflict

  • 422 company_profile_incomplete

  • 422 no_rule_for_date

  • 422 tax_code_mismatch

  • 422 tax_rules_unavailable

  • 422 validation_failed

Record a payment

Records a payment on an issued invoice.

  • Scope: invoices:write.

  • Idempotency: Idempotency-Key required. See Idempotency.

The invoice then shows its new payment_status, amount_paid and amount_due.

POST/v1/invoices/{id}/payments
Record a payment

Parameters

Idempotency-Keyrequiredstring, in header
Unique value for this request (for example a UUID), 1 to 128 printable ASCII characters. A retry with the same key and the same request gets the stored response for 24 hours, with Idempotency-Replayed: true; the same key with a different request answers 422 idempotency_key_reused. Required on POST, optional on PUT, PATCH and DELETE.Example 00000000-0000-4000-8000-0000000000a1
idrequiredstring (uuid), in path
Invoice identifier.Example 00000000-0000-4000-8000-000000000061

Request body

application/json

notesstring | null
amountrequiredstring
Decimal string, at most two decimals, above zero.
methodrequiredstring
One of bank_transfer, cash, card, cheque, direct_debit, compensation, other
paid_onrequiredstring
Date the payment was received, YYYY-MM-DD.
referencestring | null
Reference of the payment in the paying system (card transaction, bank reference).
POST /v1/invoices/{id}/payments
curl -X POST "https://api.birp.io/v1/invoices/00000000-0000-4000-8000-000000000061/payments" \
  -H "Authorization: Bearer $BIRP_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"amount":"64.50","method":"card","paid_on":"2026-10-07","reference":"EXAMPLE-PAY-0042"}'
201 CreatedJSON
{
  "data": {
    "amount": "64.50",
    "created_at": "2026-10-07T10:02:11.000Z",
    "currency": "EUR",
    "id": "d4e5f6a7-0000-4000-8000-0000000000dd",
    "invoice_id": "00000000-0000-4000-8000-000000000061",
    "method": "card",
    "paid_on": "2026-10-07",
    "reference": "EXAMPLE-PAY-0042",
    "status": "confirmed"
  }
}

Errors particular to this operation:

  • 404 not_found

  • 409 invoice_not_issued

  • 422 validation_failed

  • invoices
  • me-and-tax-codes
  • formats