> 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/pay-invoice.md).

# Pay invoice

## Paying an Invoice

The Clinch SDK provides the ability to handle user payments through the `onPayInvoice` callback. This callback is triggered when the Clinch web app requests a payment to be made. Your implementation of `onPayInvoice` should receive the invoice and either pay it immediately, or show a confirmation popup.

In the case of Clinch, the invoice is returned as a bolt11 invoice, which is a payment request format used for the Lightning Network.

When the invoice is paid, the Clinch web up will update to allow the user to play their match. The invoice is checked for payment by our server.

## **Implementing the `onPayInvoice` Callback**

The `onPayInvoice` callback will receive an object that includes the bolt11 invoice string. You should handle the payment process paying the invoice on behalf of your user.
