> For the complete documentation index, see [llms.txt](https://docs.thndr.io/integration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thndr.io/integration/lightning-iframe/cancel-invoice.md).

# Cancel invoice

```html
cancelInvoice(invoice, "https://embed-sandbox.clinch.gg");
```

If on the host application you need to cancel the payment, for example from a user action, us the cancelInvoice function on the SDK
