> ## Documentation Index
> Fetch the complete documentation index at: https://second.tech/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Swap Lightning to bitcoin

> Pay a Lightning invoice from any Lightning wallet app and receive the bitcoin as an on-chain transaction to your own address, in a single swap.

You paste your on-chain address before you pay, because Swaptopia sends the payout as soon as your Lightning payment settles. A swap must leave at least 1,000 sats after fees and, on mainnet, carry at most 2,750,000 sats.

You need:

* A Lightning wallet app holding the amount you send, plus its own routing fee.
* A fresh receive address from your on-chain wallet app.

## Start the swap

<Steps>
  <Step title="Flip the direction">
    Select the **Swap direction** button so **Lightning** sits under **You send** and **Bitcoin** under **You receive**.
  </Step>

  <Step title="Enter the amount">
    Enter the amount in sats under **You send**, or select a preset. To get a set amount on-chain instead, enter it under **You receive**. Either way, the quote is an estimate. [Read the quote](/docs/swaptopia/fees-and-limits#read-the-quote) explains each fee line.
  </Step>

  <Step title="Paste your address">
    Paste a fresh receive address from your on-chain wallet app in the **Bitcoin address** field.

    <Note>
      Reusing an address links your swaps on-chain.
    </Note>
  </Step>

  <Step title="Select Swap">
    Swaptopia opens the **Pay this invoice** stage with an invoice to pay.
  </Step>
</Steps>

<Frame caption="The address goes in before the invoice appears. The quote already takes out the service fee and miner fee">
  <video autoPlay src="https://mintcdn.com/second-0659a37d/Ys6dqcbJ8GNgbFCj/videos/swaptopia/start-lightning-to-bitcoin.mp4?fit=max&auto=format&n=Ys6dqcbJ8GNgbFCj&q=85&s=e15e2db0d4b5bb53aed692d07e80f719" aria-label="Screen recording of the Swaptopia swap card: the Swap direction button puts Lightning under You send, an address is pasted in the Bitcoin address field, and Swap opens the Pay this invoice stage with a QR code" data-path="videos/swaptopia/start-lightning-to-bitcoin.mp4" />
</Frame>

## Pay the invoice

<Steps>
  <Step title="Scan or copy the invoice">
    Scan the QR code with your Lightning wallet app, or select **Copy invoice**.
  </Step>

  <Step title="Pay it with this page open">
    The invoice is good for about 48 hours. You can close the tab and come back later. Have the page open when you pay, since Swaptopia claims the payment from this tab. If you pay while the tab is closed, your Lightning wallet app gets the payment back after a few minutes.

    <Frame caption="The stage bar shows what follows your payment: Settling, then Sending on-chain">
      <img src="https://mintcdn.com/second-0659a37d/Ys6dqcbJ8GNgbFCj/images/swaptopia/pending-hold-invoice.png?fit=max&auto=format&n=Ys6dqcbJ8GNgbFCj&q=85&s=dce0334252a4867ee7f5dad03760f095" alt="Screenshot of the Pay this invoice stage, with the amount, the invoice QR code, the Copy invoice button, and the notice that the tab can be closed" width="1152" height="1388" data-path="images/swaptopia/pending-hold-invoice.png" />
    </Frame>
  </Step>

  <Step title="Keep the tab open until the receipt appears">
    The stage changes to **Settling**, then **Sending on-chain**. If you lose the tab during **Settling**, your payment has already arrived. Reopen the same page in the same browser as soon as you can, so Swaptopia can finish the swap.
  </Step>
</Steps>

## Read the receipt

The **Sent on-chain** screen closes the swap:

* **Amount:** The sats sent to your address.
* **Fee paid:** The service fee and miner fee of the on-chain payout, in place of the quote's estimate.
* **Transaction:** A link to the payout on mempool.space, where you can follow its confirmations.

Select **Swap again** to return to the swap screen.

<Frame caption="The payout confirms on-chain like any bitcoin transaction">
  <img src="https://mintcdn.com/second-0659a37d/Ys6dqcbJ8GNgbFCj/images/swaptopia/success-bitcoin.png?fit=max&auto=format&n=Ys6dqcbJ8GNgbFCj&q=85&s=bb813b9c15766cfc581bd854f9fa5234" alt="Screenshot of the Sent on-chain screen, with the amount, the route line, the fee paid, the transaction link, and the Swap again button" width="1152" height="918" data-path="images/swaptopia/success-bitcoin.png" />
</Frame>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.