An invoice bills named customers for what they owe. Each customer gets an email with a link to pay online by card. With several customers, the total is split equally between them. Only a draft can change: once sent, an invoice is fixed.
Attributes
| Name | Type | Description |
|---|---|---|
id | string | Unique identifier, starting inv_. |
object | string | Always invoice. |
livemode | boolean | true in live mode. |
number | string | The number customers see: INV-, the day it was made, then your next number. Never reused. |
name | string | What it's for. |
description | string or null | Shown on the invoice. |
status | enum | draft, send_blocked, sent, pending_payment, partially_paid, paid, overdue or canceled. |
currency | string | usd. |
language | string | The invoice and its emails are written in it. |
issue_date | date | YYYY-MM-DD. |
due_date | date | YYYY-MM-DD. |
payment_terms | enum | due_on_receipt, net_15, net_30, net_45, net_60 or custom. |
line_items | array | Each line: price (or null for a one-time item), name, description, quantity, unit_amount, discount_bps (basis points: 1000 is 10%) and total. |
subtotal | integer | Before discounts and tax, in cents. |
discount_amount | integer | The lines' discounts, in cents. |
tax_rate_bps | integer or null | The tax rate in basis points (875 is 8.75%), charged on the total after discounts, for taxable customers only. |
tax_amount | integer | In cents. |
total | integer | In cents. |
amount_paid | integer | In cents. |
amount_due | integer | What's still owed, in cents. |
recipients | array | Each customer billed: customer, status (pending, sent, viewed, partially_paid, paid, overdue or canceled), amount_due, amount_paid and paid_at. |
late_fee_bps | integer or null | In basis points. Stated on the invoice; it is never charged automatically. |
auto_reminders | boolean | Emails anyone still owing 7, 3 and 1 days before the due date. |
notes | string or null | Printed above the items. |
terms | string or null | Printed at the foot. |
scheduled_send_at | timestamp or null | When a draft sends itself. |
sent_at | timestamp or null | When it was sent. |
paid_at | timestamp or null | When it was paid in full. |
canceled_at | timestamp or null | When it was canceled. |
created | timestamp | When it was created. |
Example
Endpoints
| Endpoint | What it does |
|---|---|
POST /v1/invoices | Create an invoice as a draft. |
GET /v1/invoices/{id} | Get an invoice by its ID. |
POST /v1/invoices/{id} | Change a draft. A sent invoice is fixed: cancel it and duplicate it. |
POST /v1/invoices/{id}/send | Email a draft to its customers, or send a sent one again. |
POST /v1/invoices/{id}/pay | Record a payment the customer made another way, such as a bank transfer. |
POST /v1/invoices/{id}/void | Cancel an invoice: nothing more is owed. |
POST /v1/invoices/{id}/duplicate | Copy an invoice into a new draft. |
DELETE /v1/invoices/{id} | Delete a draft or a canceled invoice. Its number is never reused. |
GET /v1/invoices | List your invoices, newest first. |