Cancel an unpaid invoice

Requires billing:write; reseller:purchase also permits this operation. Cancels an open purchase, top-up or plan upgrade 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.

post/v1/invoices/{id}/cancel

Request

  • Base URL: https://api.trueproxies.com
  • URL: https://api.trueproxies.com/v1/invoices/{id}/cancel
  • Auth: HTTP bearer

Path parameters

idstring uuid required

Query parameters

customer_idstring uuid

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.

Response

cancelled

activated_atstring date-time

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.

activation_failed_atstring date-time

Automatic fulfillment stopped and needs operator attention. Payment remains received; this does not mean a refund completed or previously purchased service was revoked.

amount_centsinteger required
created_atstring date-time required
currencystring required
discount_bpinteger
display_namestring required
due_atstring date-time required
expiredboolean

True when a cancelled invoice closed because it was not paid by due_at. Invoices cancelled before this field existed report false.

idstring uuid required

Internal API identifier. Use reference for customer-facing display.

kind'wallet_topup' | 'purchase' | 'renewal' | 'topup' | 'upgrade' | 'custom' | 'white_label' required
list_amount_centsinteger
offer_keystring required
paid_atstring date-time
promo_codestring
promo_discount_centsinteger
referencestring required

Stable, unique customer-facing reference.

service_idstring uuid
status'open' | 'paid' | 'cancelled' required
upgrade_credit_centsinteger

Plan upgrades only. Credit for unused time on the previous plan.

upgrade_price_centsinteger

Plan upgrades only. The new plan's price; amount_cents is this minus upgrade_credit_cents.

Example response

{
  "reference": "INV-001001"
}

Changes

No recorded changes to this operation across all 1 revision of this API.