Skip to content

Search API reference

Find an endpoint or a guide of the Sovgate API reference and jump straight to it.

Cancel an invoice

Cancel an invoice: nothing more is owed.

POST/v1/invoices/{id}/void

Cancel an invoice: nothing more is owed.

Endpoint

http
POST /v1/invoices/{id}/void

Path parameters

NameTypeDescription
idstringThe invoice's ID, inv_....

Request body

NameTypeRequiredDescription
reasonstringOptionalKept in its history.

Example request

bash
curl -X POST https://api.sovgate.com/v1/invoices/inv_9901466208dd4002a3d80244/void \  -H "Authorization: Bearer sov_sk_test_your_key" \  -H "Idempotency-Key: 8c96f4b7-4b2a-4c1d-9e3f-e1d878afa0dc"

Example response

json
{  "id": "inv_9901466208dd4002a3d80244",  "object": "invoice",  "livemode": false,  "number": "INV-20261127-10000042",  "name": "October retainer",  "description": null,  "status": "canceled",  "currency": "usd",  "language": "en",  "issue_date": "2026-11-27",  "due_date": "2026-12-27",  "payment_terms": "net_30",  "line_items": [    {      "price": "price_d2fcc8475d89f661d674185c",      "name": "Consulting, October",      "description": null,      "quantity": 10,      "unit_amount": 15000,      "discount_bps": 0,      "total": 150000    }  ],  "subtotal": 150000,  "discount_amount": 0,  "tax_rate_bps": null,  "tax_amount": 0,  "total": 150000,  "amount_paid": 0,  "amount_due": 0,  "recipients": [    {      "customer": "cust_13ed3f69adfcfcb6289a5491",      "status": "sent",      "amount_due": 150000,      "amount_paid": 0,      "paid_at": null    }  ],  "late_fee_bps": null,  "auto_reminders": true,  "notes": "Thank you for your business.",  "terms": null,  "scheduled_send_at": null,  "sent_at": "2026-11-27T09:00:00Z",  "paid_at": null,  "canceled_at": "2026-11-28T12:00:00Z",  "created": "2026-11-27T08:41:00Z"}

Errors

CodeWhen
invalid_stateSomeone already paid it.