SoftSolzSoftSolz
HomeAPI GuideAPI ReferenceWidget Tester
invoicing

Void a posted invoice.

Void a posted invoice.

POSThttps://staging.softsolz.uk/api/v1/services/invoicing/invoices/{id}/void

Recent Requests

Log in to see full request history
TimeStatusUser Agent
Make a request to see history.

Path Params

idstringrequired

Headers

Authorizationstringrequired

Bearer token: `Bearer sk_live_...` (or `sk_test_...` for sandbox). A login token will not work here.

Idempotency-Keystring

Optional idempotency key for safe retries.

Body Params

reasonstring | null

Optional void reason stored on the invoice.

Response

Response Body

idintegerInvoice id.
customer_idintegerCustomer id.
invoice_numberstringHuman invoice number.
issue_datestringIssue date (YYYY-MM-DD).
due_datestringDue date (YYYY-MM-DD).
currencystringISO 4217 currency code.
subtotalstringDecimal amount as a numeric string (NOT minor units).
tax_totalstringTotal tax, numeric string.
totalstringInvoice total, numeric string.
amount_paidstringAmount paid so far, numeric string.
statusstringInvoice status.
linesarray of objectsInvoice line items.
paymentsarray of objectsRecorded payments; payments[].id is the payment_id used when issuing a refund.
created_atstringCreation timestamp.
updated_atstringLast update timestamp.

Request

import { SoftSolz } from '@softsolz/sdk';
const client = new SoftSolz({ apiKey: process.env.SOFTSOLZ_API_KEY });
const result = await client.invoicing.voidInvoice('<id>', {});
console.log(result);

Credentials

Sent as a Bearer token. Stored only in your browser.

Response · 200

{
"data": {
"id": 0,
"customer_id": 0,
"invoice_number": "string",
"issue_date": "string",
"due_date": "string",
"currency": "string",
"subtotal": "string",
"tax_total": "string",
"total": "string",
"amount_paid": "string",
"status": "string",
"lines": [],
"payments": [],
"created_at": "string",
"updated_at": "string"
}
}