Invoice items
One-off charges or credits queued for a customer's next subscription invoice.
The invoice item object
idstring
Prefixed
ii_.objectstring
invoice_itemcustomerstring
subscriptionstring | null
invoicestring | null
Set once the item has been placed on an invoice.
amountinteger
Per unit. Negative for credits.
currencystring
descriptionstring
Shown as the invoice line.
quantityinteger
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
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