Cancel an unpaid invoice
const url = 'https://api.trueproxies.com/v1/invoices/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/cancel';const options = {method: 'POST', 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 POST \ --url https://api.trueproxies.com/v1/invoices/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/cancel \ --header 'Authorization: Bearer <token>'Requires billing:write; reseller:purchase also permits this operation. Cancels an open purchase or top-up invoice; nothing is owed afterwards. A renewal, a charge raised by staff, a paid invoice, or an invoice with a payment attempt still pending at a provider returns 409.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Owned sub-customer UUID. Resellers only; reads require reseller:read and writes reseller:purchase in addition to the operation scope. X-Customer-Id header is an alternative. Not allowed for me, wallet, trial, API keys, or reseller-management routes.
Responses
Section titled “Responses”Cancelled
object
When this invoice’s service activation, top-up, renewal, or charge-only processing committed. Payment receipt and an already-active service do not establish this outcome.
Automatic fulfillment stopped and needs operator attention. Payment remains received; this does not mean a refund completed or previously purchased service was revoked.
Who the invoice is issued to, copied from the account’s billing details when the invoice was created. Absent when the account had no billing details then; saving details later does not change it.
object
True when a cancelled invoice closed because it was not paid by due_at. Invoices cancelled before this field existed report false.
Internal API identifier. Use reference for customer-facing display.
object
GB for top-ups; taken from the offer otherwise
object
Present only while the invoice is payable and the pending checkout has not reached its known expiry
Staff views only. Why the checkout ended unpaid, as the provider reports it: not_attempted (no payment submitted), not_completed (started, never confirmed), or the card issuer’s code such as card_declined/insufficient_funds.
A provider refund was reported without a trustworthy amount. Reconciliation is required before any additional refund.
The recorded request can be retried unchanged within the provider idempotency window.
Refund request recorded at; not proof of completion
Stable, unique customer-facing reference.
Example
{ "kind": "wallet_topup", "payments": [ { "provider": "manual", "refund_status": "processing", "status": "pending" } ], "reference": "INV-001001", "status": "open"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}Error
object
What a client needs to act on the error (ids, flags), never display text.
object
Example
{ "code": "BAD_REQUEST"}