Update an invoice
Updates a draft invoice. Only the fields you send are changed.
Finalized invoices can't be updated. To change an invoice's status, use the dedicated endpoints (such as finalize) rather than this one.
The amounts are calculated from the invoice's line items and adjustments, so they can't be set here.
Authorization
X-API-Key X-Publishable-Key In: header
In: header
Path Parameters
Public ID of the invoice.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PUT "https://example.com/v1/invoices/inv_9Pq3Xw7Rt2" \ -H "Content-Type: application/json" \ -d '{}'{ "public_id": "inv_9Pq3Xw7Rt2", "invoice_number": "INV-2026-0042", "to_invoice_consumer_id": "ic_8hTq2Lm4Vx", "from_invoice_consumer_id": "string", "status": "draft", "document_type": "invoice", "total_amount": 15000, "amount_due": 15000, "deposit_amount": 0, "late_fee_amount": 0, "early_pay_discount_amount": 0, "currency": "USD", "payment_link": "http://example.com", "billing_period_start": "2019-08-24T14:15:22Z", "billing_period_end": "2019-08-24T14:15:22Z", "entity_type": "subscription", "entity_id": "s_3fKq8Lw2Zp", "order_token": "string", "quote_accepted_at": "2019-08-24T14:15:22Z", "issued_at": "2019-08-24T14:15:22Z", "sent_at": "2019-08-24T14:15:22Z", "due_at": "2019-08-24T14:15:22Z", "finalized_at": "2019-08-24T14:15:22Z", "paid_at": "2019-08-24T14:15:22Z", "voided_at": "2019-08-24T14:15:22Z", "metadata": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Delete an invoice DELETE
Deletes a draft or voided invoice. Invoices in any other status can't be deleted.
List a customer's invoices GET
Lists the invoices addressed to one customer, using a portal token instead of your API keys. Draft invoices are not included. A portal token is valid for 30 days. Send it in the `Authorization` header as a bearer token. Passing it as the `token` query parameter also works, but the header keeps it out of logs and browser history.