Create an invoice
Bills a customer for sales not yet on an invoice: every one of them, or the ones you name. Each line is a copy of a sale at the price it was made at. An invoice is in one currency and holds at most 500 sales, oldest first. ResellerHQ does not collect payment from your customers: you take the money however you already do, and record it here. Send an Idempotency-Key header so a retry can never invoice twice.
apiKeyAuthorizationBearer <token>An API key from the Developers page. rhq_test_ keys reach the sandbox, rhq_live_ keys the live side.
Idempotency-Key?stringA value unique to this request, such as a UUID. A retry with the same key within 24 hours returns the first outcome instead of running again.
8 <= length <= 200application/json- body
customerId*stringdueInDays?integerHow many days from now the invoice is due. Unset, your account's default, or 14 days if it has none
0 <= value <= 365taxBps?integerTax as a share of the subtotal, in basis points: 2000 is 20%
0 <= value <= 10000note?|Shown on the invoice. Unset, your account's default note; null for no note
saleIds?array<string>Bill only these sales. Unset, everything not yet invoiced
1 <= items <= 500currency?stringBill only the sales in this currency, for a customer with sales in more than one
^[A-Z]{3}$discounts?array<>Money off, before tax, taken after the sales
items <= 20Created
application/json- response
Created
id*stringnumber*stringCounts up from INV-0001 across your account, with no gaps
customerId*stringcurrency*stringThe currency of every amount on the invoice
^[A-Z]{3}$lines*array<>subtotal*integerThe lines added up, before tax
0 <= valuetaxBps*|The tax rate in basis points. Null when there is no tax
tax*integersubtotal times the tax rate, rounded
0 <= valuetaxLines*array<>How tax is made up, line by line: one entry per matched tax rule component. Empty on an invoice priced with the flat taxBps or with no tax at all
reverseCharge*|Set when the matched tax rule reverse-charges this invoice: tax is 0 and this is the legal note and both parties' tax numbers as they stood at issue
total*integerWhat the customer owes: subtotal plus tax
0 <= valuestatus*stringcredited was corrected in full by credit notes and asks for nothing
"open""paid""void""credited"overdue*booleanTrue for an open invoice whose due date has passed: from a day after dueAt, so an invoice due today is not overdue today
shared*booleanTrue once POST /invoices/{id}/share has made a public link for this invoice, false again once revoked. The token itself is never in this response or the list
issuedAt*stringdate-timedueAt*stringdate-timepaidAt*|nullvoidedAt*|nullnote*string|nullcredited*integerWhat credit notes against this invoice come to. 0 when there are none
0 <= valuepaidAmount*integerCollected so far via payments applied to this invoice. 0 until the first one
0 <= valueamountDue*integerWhat is still owed: total less credited and paidAmount, and 0 on one that is paid, void or credited in full
0 <= valuecreditedAt*|nullissuer*|Your account as it billed this invoice, copied at the time it was issued. Null on invoices made before you set any billing details
actor*|Who raised this invoice
voidedBy*|Who voided this invoice. Null unless status is void
paidBy*|Who recorded this invoice as paid. Null unless status is paid through that path
sharedBy*|Who last shared this invoice. Null until it has ever been shared
curl -X POST "https://example.com/v1/invoices" \ -H "Idempotency-Key: 2f1c9a52-7d0e-4a8e-9a53-0c1f6f3f2b11" \ -H "Content-Type: application/json" \ -d '{ "customerId": "cus_01K6XJ4Q8ZT3M9R5V2B7WDHNCA" }'{ "id": "inv_01K6XJ4Q8ZT3M9R5V2B7WDHNCA", "number": "INV-0001", "customerId": "cus_01K6XJ4Q8ZT3M9R5V2B7WDHNCA", "currency": "USD", "lines": [ { "saleId": "sal_01K6XJ4Q8ZT3M9R5V2B7WDHNCA", "description": "northwind-telecom.com, 2 years", "quantity": 2, "unitPrice": 1439, "total": 2878 } ], "subtotal": 2878, "taxBps": 2000, "tax": 576, "taxLines": [ { "name": "string", "rateBps": 2000, "amount": 2878 } ], "reverseCharge": { "note": "string", "sellerTaxId": "string", "customerTaxId": "string" }, "total": 3454, "status": "open", "overdue": true, "shared": true, "issuedAt": "2026-10-07T11:04:31.000Z", "dueAt": "2026-10-21T11:04:31.000Z", "paidAt": null, "voidedAt": null, "note": "Thank you for your business", "credited": 2878, "paidAmount": 2878, "amountDue": 2878, "creditedAt": null, "issuer": { "name": "Northwind Telecom", "legalName": null, "addressLines": [], "taxId": null, "billingEmail": null }, "actor": { "kind": "user", "label": "string" }, "voidedBy": { "kind": "user", "label": "string" }, "paidBy": { "kind": "user", "label": "string" }, "sharedBy": { "kind": "user", "label": "string" }}