Invoice items

One-off charges or credits queued for a customer's next subscription invoice.

The invoice item object

idstring
Prefixed ii_.
objectstring
invoice_item
customerstring
subscriptionstring | null
invoicestring | null
Set once the item has been placed on an invoice.
amountinteger
Per unit, VAT included, whichever tax_behavior it was sent with. Negative for a credit, which is not a line on the next invoice but a balance applied to it after tax; see credits.
currencystring
descriptionstring
Shown as the invoice line.
quantityinteger
amount_excluding_taxinteger
Per unit, VAT excluded: the amount you sent when tax_behavior is exclusive.
tax_rateinteger
VAT inside amount, in basis points. 2400 is 24%. The line is split at this rate; amount is what lands on the invoice, like a price's amount.
tax_behaviorenum
inclusive or exclusive: how amount was sent.
metadataobject
created_attimestamp

Create an invoice item

POST/v1/invoice_itemsSecret key

Body

customerstringrequired
amountintegerrequired
Per unit in the smallest currency unit. Negative amounts create credits.
descriptionstringrequired
subscriptionstring
Place the item on this subscription's next invoice. Must belong to customer.
currencystringdefault: ISK
Must match the subscription's currency when one is given.
quantityintegerdefault: 1
tax_rateinteger
VAT inside amount, in basis points. Defaults to your default VAT rate under Settings; ignored while VAT is off there.
tax_behaviorenumdefault: inclusive
exclusive when amount is the net: the VAT at tax_rate is added on top, rounded per unit, and the item stores the result as its amount.
metadataobject
curl https://api.borga.is/v1/invoice_items \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{
    "customer": "cus_8Jk2Lm4Np6Qr8St0Uv2Wx4Yz",
    "subscription": "sub_9Qw1Er3Ty5Ui7Op9As1Df3Gh",
    "amount": 15000,
    "description": "Onboarding workshop"
  }'

Errors: mismatch, currency_mismatch, resource_not_found.

Retrieve an invoice item

GET/v1/invoice_items/:idSecret key

List invoice items

GET/v1/invoice_itemsSecret key

Query parameters

customerstring
subscriptionstring
pendingboolean
true returns only items not yet invoiced.
limitintegerdefault: 25
starting_afterstring