Ask for an invitation
Menu

API reference

Invoices

An invoice is a numbered bill to a named customer with a due date.

The states, in the order an object moves through them. Where a step lists several, the object takes one of them.

  1. draftEditable, no order
  2. openFinalized: the number is assigned, the order exists, the page https://pay.orrerie.com/i/<inv_id> works
  3. paid or void

overdue is a flag on an open invoice past its due date. Finalizing creates exactly one order, which expires 30 days after the due date; paying the order pays the invoice. Numbers are INV- plus a per-merchant counter padded to four digits, never reused.

tax_amount is a figure you type. Orrerie calculates no tax and gives no tax advice.

The invoice object

JSON

{
  "id": "inv_sxr44t9zk7krg104gmhsqx2p",
  "object": "invoice",
  "livemode": true,
  "created": "2026-10-08T09:00:00.000Z",
  "updated": "2026-10-08T09:02:00.000Z",
  "number": "INV-0042",
  "status": "open",
  "overdue": false,
  "customer": "cus_8ea07c40qsvv19f7rgmeb8ha",
  "order": "ord_18ayqdcy8s50t2dp5r257ep3",
  "currency": "USD",
  "line_items": [
    {
      "name": "Wholesale beans, 20 kg",
      "quantity": 20,
      "unit_amount": "17.50",
      "amount": "350.00",
      "price": null
    }
  ],
  "subtotal": "350.00",
  "discount_amount": "0.00",
  "tax_amount": "0.00",
  "total": "350.00",
  "amount_paid": "0.00",
  "amount_due": "350.00",
  "due_date": "2026-10-22",
  "memo": "Thank you for your order.",
  "footer": "Acme Coffee Roasters LLC",
  "url": "https://pay.orrerie.com/i/inv_sxr44t9zk7krg104gmhsqx2p",
  "pdf": "file_jgxe7twfcheqtdha9pafpnc3",
  "reminders": {
    "days_before_due": [
      3
    ],
    "days_after_due": [
      1,
      7
    ]
  },
  "finalized_at": "2026-10-08T09:02:00.000Z",
  "sent_at": "2026-10-08T09:02:05.000Z",
  "paid_at": null,
  "voided_at": null,
  "metadata": {}
}
Table: The invoice object
FieldMeaning
statusOne of draft, open, paid, void.

Every field

Fields of the invoice object

Fields of the invoice object
FieldTypeMeaning
idstringUnique identifier: the object prefix, an underscore, 24 lower-case Crockford base32 characters.
objectstringThe type of this object.
livemodebooleantrue for live mode (real money); false for test mode (simulated payments).
createdstring (date-time)When the object was created. RFC 3339, UTC, milliseconds.
updatedstring (date-time)When the object last changed.
numberstring or nullThe invoice number, INV- and a counter; null while the invoice is a draft.
statusstringOne of draft, open, paid, void.
overduebooleantrue when the invoice is open and past its due date.
customerobjectThe cus_ id billed, or the customer object when expanded.
orderobjectThe ord_ id the invoice is paid through, or the order object when expanded; null while a draft.
currencystringThe currency the invoice is in.
line_itemsarray of objectsWhat the invoice bills, line by line.
line_items[].namestringThe item's name, as shown to the payer.
line_items[].quantityintegerHow many of the item.
line_items[].unit_amountstringThe price of one, a decimal string in the invoice's currency.
line_items[].amountstringThe line's total: quantity times the unit amount.
line_items[].pricestring or nullThe price_ id the line was made from; null for a line given by name and amount.
subtotalstringThe sum of the lines.
discount_amountstringThe discount taken off the subtotal.
tax_amountstringThe tax added, as the merchant typed it. Orrerie calculates no tax.
totalstringWhat the invoice asks for: subtotal minus discount plus tax.
amount_paidstringWhat has been paid.
amount_duestringWhat is still to pay.
due_datestringThe day payment is due, YYYY-MM-DD.
memostring or nullA note printed on the invoice; null for none.
footerstring or nullText printed at the bottom of the invoice; null for none.
urlstring or nullThe invoice's page on the payer site; null while a draft.
pdfstring or nullThe file_ id of the invoice's PDF; null until it is made.
remindersobjectWhen the customer is reminded to pay.
reminders.days_before_duearray of integersDays before the due date a reminder is sent.
reminders.days_after_duearray of integersDays after the due date a reminder is sent.
finalized_atstring (date-time) or nullWhen the invoice was finalized; null while a draft.
sent_atstring (date-time) or nullWhen the invoice was emailed; null until then.
paid_atstring or nullWhen the invoice was paid; null until then.
voided_atstring or nullWhen the invoice was voided; null unless it was.
metadataobjectUp to 50 keys of your own data. Key up to 40 characters, value a string up to 500 characters. Never used by Orrerie; never put secrets or personal data here.

Endpoints

Events

Webhook events whose data.object is an object of this page.