Cancel Payment

How do I cancel a Bitcoin Lightning Network payment?

Availability

👍

To enable in the production environment, please contact the partner success team.

Overview

Invoices may only be cancelled while in "state":"unpaid".

Once an invoice has progressed to either "state":"settling" or "state":"paid", it can no longer be cancelled.

Cancel an invoice

For an invoice that is "state":"unpaid", you may cancel the invoice via the DELETE /api/invoices/{invoice_guid} endpoint.

When executed, the following response body will be returned:

{
  "created_at": "<created_at timestamp>",
  "updated_at": "<updated_at timestamp>",
  "guid": "<provided invoice GUID>",
  "customer_guid": "<provided customer GUID>",
  "account_guid": "<associated account GUID>",
  "type": "lightning",
  "asset": "USD",
  "receive_amount": 100,
  "deliver_amount": 100,
  "fee": 0,
  "state": "cancelling",
  "labels": null
}

The invoice will be in "state":"cancelling" in this initial response.

Using the GET /api/invoices/{invoice_guid} endpoint, the following response will be returned:

{
  "created_at": "<created_at timestamp>",
  "updated_at": "<updated_at timestamp>",
  "guid": "<provided invoice GUID>",
  "customer_guid": "<provided customer GUID>",
  "account_guid": "<associated account GUID>",
  "type": "lightning",
  "asset": "USD",
  "receive_amount": 100,
  "deliver_amount": 100,
  "fee": 0,
  "state": "cancelled",
  "labels": null
}

The invoice will automatically progress to "state":"cancelled".

Once an invoice is "state":"cancelled", payment instructions can no longer be generated for the invoice.