Delete an invoice
DELETE
/invoices/{id}
const url = 'https://api.brrndops.com/v1/invoices/inv_8f3c0e7e-5d2a-4c1b-9f43-2c1d0a9b7e11';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.brrndops.com/v1/invoices/inv_8f3c0e7e-5d2a-4c1b-9f43-2c1d0a9b7e11 \ --header 'Authorization: Bearer <token>'Moves the invoice to deleted. Deleted invoices can’t be changed, sent or rendered.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”id
required
string
Example
inv_8f3c0e7e-5d2a-4c1b-9f43-2c1d0a9b7e11Responses
Section titled “ Responses ”The deleted invoice.
Media typeapplication/json
object
id
string
object
string
livemode
boolean
number
string
status
string
currency
string
customer
object
name
string | null
email
string | null format: email
phone
string | null
address
string | null
country_code
ISO 3166-1 alpha-2
string | null
issuer
object
name
string | null
email
string | null format: email
phone
string | null
address
string | null
country_code
ISO 3166-1 alpha-2
string | null
line_items
Array<object>
object
id
string
object
string
description
string
quantity
integer
unit_amount
integer
amount
Quantity × unit_amount.
integer
subtotal
integer
tax_percent
number
tax_amount
integer
discount_percent
number
discount_amount
integer
total
Subtotal + tax_amount − discount_amount.
integer
issue_date
string format: date
due_date
string format: date
payment_terms
string | null
payment_details
object | null
template
string
branding
object
primary_color
string
secondary_color
string
font_family
string
logo_url
Must be https.
string | null format: uri
external_ref
string | null
metadata
object
key
additional properties
string
created_at
string format: date-time
updated_at
string format: date-time
Example
{ "id": "inv_8f3c0e7e-5d2a-4c1b-9f43-2c1d0a9b7e11", "object": "invoice", "number": "INV-001", "status": "draft", "customer": { "country_code": "NG" }, "issuer": { "country_code": "NG" }, "line_items": [ { "id": "li_…", "object": "line_item" } ], "branding": { "primary_color": "#2388ff", "secondary_color": "#f7f8fc" }}Missing, invalid, expired or revoked API key.
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
The request field the error relates to.
string
request_id
string
Example
{ "error": { "type": "authentication_error", "code": "parameter_missing" }}The key lacks the required scope (insufficient_scope), or the business isn’t verified yet (account_not_verified, production keys only).
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
The request field the error relates to.
string
request_id
string
Example
{ "error": { "type": "authentication_error", "code": "parameter_missing" }}No such resource in this account and environment.
Media typeapplication/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
The request field the error relates to.
string
request_id
string
Example
{ "error": { "type": "authentication_error", "code": "parameter_missing" }}