curl -X POST https://sandbox.layerfi.com/v1/businesses/{business_id}/invoices/${invoice_id}/void \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
{
"data": {
"type": "Invoice",
"id": "6d0c298f-3e4e-4538-9a71-1d5359c22f71",
"business_id": "83d8fb80-31ee-4d57-b684-44b4aaa5e01f",
"external_id": "019234",
"status": "VOID",
"sent_at": "2024-04-02T09:02:00Z",
"due_at": "2023-04-02T09:02:00Z",
"paid_at": null,
"voided_at": null,
"invoice_number": "1",
"recipient_name": "John Doe",
"line_items": [
{
"id": "e6a491dd-9c22-4403-a54f-32d741a7ec67",
"invoice_id": "6d0c298f-3e4e-4538-9a71-1d5359c22f71",
"account_identifier": null,
"description": null,
"product": "Cleaner Solution Pro",
"unit_price": 1299,
"quantity": "2.00",
"subtotal": 2598,
"discount_amount": 0,
"sales_taxes_total": 218,
"sales_taxes": [
{
"tax_account": {
"type": "Tax_Name",
"name": "CALIFORNIA_VAT"
},
"amount": 218
}
],
"total_amount": 2816
},
{
"id": "44f06385-3ef5-4517-8095-eeedaf2054ab",
"invoice_id": "6d0c298f-3e4e-4538-9a71-1d5359c22f71",
"account_identifier": null,
"description": null,
"product": "Full drain cleaning service",
"unit_price": 25000,
"quantity": "1.00",
"subtotal": 25000,
"discount_amount": 0,
"sales_taxes_total": 0,
"total_amount": 25000
}
],
"subtotal": 27598,
"additional_discount": 250,
"additional_sales_taxes_total": 0,
"tips": 0,
"tips_account": null,
"total_amount": 27566,
"outstanding_balance": 27566,
"payment_allocations": [],
"imported_at": "2024-04-19T02:23:59.902537Z",
"updated_at": null,
"transaction_tags": []
}
}
Void an invoice, removing it from accounting and marking it as voided.
curl -X POST https://sandbox.layerfi.com/v1/businesses/{business_id}/invoices/${invoice_id}/void \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
{
"data": {
"type": "Invoice",
"id": "6d0c298f-3e4e-4538-9a71-1d5359c22f71",
"business_id": "83d8fb80-31ee-4d57-b684-44b4aaa5e01f",
"external_id": "019234",
"status": "VOID",
"sent_at": "2024-04-02T09:02:00Z",
"due_at": "2023-04-02T09:02:00Z",
"paid_at": null,
"voided_at": null,
"invoice_number": "1",
"recipient_name": "John Doe",
"line_items": [
{
"id": "e6a491dd-9c22-4403-a54f-32d741a7ec67",
"invoice_id": "6d0c298f-3e4e-4538-9a71-1d5359c22f71",
"account_identifier": null,
"description": null,
"product": "Cleaner Solution Pro",
"unit_price": 1299,
"quantity": "2.00",
"subtotal": 2598,
"discount_amount": 0,
"sales_taxes_total": 218,
"sales_taxes": [
{
"tax_account": {
"type": "Tax_Name",
"name": "CALIFORNIA_VAT"
},
"amount": 218
}
],
"total_amount": 2816
},
{
"id": "44f06385-3ef5-4517-8095-eeedaf2054ab",
"invoice_id": "6d0c298f-3e4e-4538-9a71-1d5359c22f71",
"account_identifier": null,
"description": null,
"product": "Full drain cleaning service",
"unit_price": 25000,
"quantity": "1.00",
"subtotal": 25000,
"discount_amount": 0,
"sales_taxes_total": 0,
"total_amount": 25000
}
],
"subtotal": 27598,
"additional_discount": 250,
"additional_sales_taxes_total": 0,
"tips": 0,
"tips_account": null,
"total_amount": 27566,
"outstanding_balance": 27566,
"payment_allocations": [],
"imported_at": "2024-04-19T02:23:59.902537Z",
"updated_at": null,
"transaction_tags": []
}
}
Voiding an invoice cancels it entirely, removing revenue and receivables from the ledger and marking the invoice as voided.
Voiding can only be performed on an invoice before payments have been collected or write-offs have been made.
If an invoice was created by mistake and included payments, these should be deleted instead of voiding.
Returns the updated Invoice Object
curl -X POST https://sandbox.layerfi.com/v1/businesses/{business_id}/invoices/${invoice_id}/void \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
{
"data": {
"type": "Invoice",
"id": "6d0c298f-3e4e-4538-9a71-1d5359c22f71",
"business_id": "83d8fb80-31ee-4d57-b684-44b4aaa5e01f",
"external_id": "019234",
"status": "VOID",
"sent_at": "2024-04-02T09:02:00Z",
"due_at": "2023-04-02T09:02:00Z",
"paid_at": null,
"voided_at": null,
"invoice_number": "1",
"recipient_name": "John Doe",
"line_items": [
{
"id": "e6a491dd-9c22-4403-a54f-32d741a7ec67",
"invoice_id": "6d0c298f-3e4e-4538-9a71-1d5359c22f71",
"account_identifier": null,
"description": null,
"product": "Cleaner Solution Pro",
"unit_price": 1299,
"quantity": "2.00",
"subtotal": 2598,
"discount_amount": 0,
"sales_taxes_total": 218,
"sales_taxes": [
{
"tax_account": {
"type": "Tax_Name",
"name": "CALIFORNIA_VAT"
},
"amount": 218
}
],
"total_amount": 2816
},
{
"id": "44f06385-3ef5-4517-8095-eeedaf2054ab",
"invoice_id": "6d0c298f-3e4e-4538-9a71-1d5359c22f71",
"account_identifier": null,
"description": null,
"product": "Full drain cleaning service",
"unit_price": 25000,
"quantity": "1.00",
"subtotal": 25000,
"discount_amount": 0,
"sales_taxes_total": 0,
"total_amount": 25000
}
],
"subtotal": 27598,
"additional_discount": 250,
"additional_sales_taxes_total": 0,
"tips": 0,
"tips_account": null,
"total_amount": 27566,
"outstanding_balance": 27566,
"payment_allocations": [],
"imported_at": "2024-04-19T02:23:59.902537Z",
"updated_at": null,
"transaction_tags": []
}
}