> ## 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 bitcoin to Lightning

> Send on-chain bitcoin to Swaptopia and have it paid out over Lightning, to an invoice or Lightning address of your choice, in a single swap.

Swaptopia asks for the Lightning invoice only after your bitcoin confirms, so you create it for the exact figure the swap pays. On mainnet, a swap starts at 51,000 sats or more.

You need:

* An on-chain wallet app holding the amount you send, plus its own miner fee.
* A Lightning wallet app that can create an invoice, or a Lightning address.

## Start the swap

<Steps>
  <Step title="Check the direction">
    **Bitcoin** sits under **You send** and **Lightning** under **You receive**. If they are the other way round, select the **Swap direction** button.
  </Step>

  <Step title="Enter the amount">
    Enter the amount in sats under **You send**, or select a preset. To get a set amount over Lightning instead, enter it under **You receive**. Either way, the quote is an estimate. Swaptopia raises an amount under the smallest swap the Ark server takes. A note on the swap card says so. [Read the quote](/docs/swaptopia/fees-and-limits#read-the-quote) explains each fee line.
  </Step>

  <Step title="Select Swap">
    Swaptopia opens the **Send bitcoin** stage with an address to fund.
  </Step>
</Steps>

<Frame caption="A preset fills in the amount. Swap then opens the Send bitcoin stage">
  <video autoPlay src="https://mintcdn.com/second-0659a37d/Ys6dqcbJ8GNgbFCj/videos/swaptopia/start-bitcoin-to-lightning.mp4?fit=max&auto=format&n=Ys6dqcbJ8GNgbFCj&q=85&s=a62620fa8832e9b19ce78999d7ac7be6" aria-label="Screen recording of the Swaptopia swap card: the 100k preset fills in You send and the quote, then Swap opens the Send bitcoin stage with a funding address and its QR code" data-path="videos/swaptopia/start-bitcoin-to-lightning.mp4" />
</Frame>

## Fund the address

<Steps>
  <Step title="Scan or copy the address">
    Scan the QR code with your on-chain wallet app, which also fills in the amount, or select **Copy address**.
  </Step>

  <Step title="Send exactly the amount shown">
    Your on-chain wallet app adds its own miner fee on top. Swaptopia swaps whatever arrives at the address.
  </Step>
</Steps>

<Frame caption="The address stays yours until you use it, so you can close the tab at this stage">
  <img src="https://mintcdn.com/second-0659a37d/Ys6dqcbJ8GNgbFCj/images/swaptopia/pending-fund-address.png?fit=max&auto=format&n=Ys6dqcbJ8GNgbFCj&q=85&s=e35fc86906f6290b219b58a12877f7fd" alt="Screenshot of the Send bitcoin stage, with the amount to send, the funding address, its QR code, and the Copy address button" width="1152" height="1482" data-path="images/swaptopia/pending-fund-address.png" />
</Frame>

<Note>
  To stop before you send anything, select **Cancel**.

  If less than the minimum arrives, [top up the same address](/docs/swaptopia/troubleshooting#received-less-than-the-minimum).

  If more than 0.1 BTC arrives on mainnet, Swaptopia swaps the maximum. The rest stays in the wallet and becomes [leftover sats](/docs/swaptopia/wallet#send-leftover-sats) if it reaches the Ark server's boarding minimum.
</Note>

## Wait for the confirmations

Keep this tab open while the stage reads **Confirming**. On mainnet, Swaptopia waits for two confirmations, usually about 20 minutes. If you lose the tab, reopen the same page in the same browser. The swap [resumes where it left off](/docs/swaptopia/troubleshooting#resume-a-swap-after-closing-the-tab).

<Frame caption="Swaptopia moves to the invoice step on its own once the confirmations are in">
  <img src="https://mintcdn.com/second-0659a37d/Ys6dqcbJ8GNgbFCj/images/swaptopia/pending-confirming.png?fit=max&auto=format&n=Ys6dqcbJ8GNgbFCj&q=85&s=dab0069c47136d62f0ddada75f3415ff" alt="Screenshot of the Confirming stage, with the confirmation wait and the notice to keep the tab open" width="1152" height="826" data-path="images/swaptopia/pending-confirming.png" />
</Frame>

## Create the Lightning invoice

<Steps>
  <Step title="Select Copy amount">
    The **Create a Lightning invoice** screen shows the exact figure to invoice, with the service fee already taken out. **Copy amount** puts it on your clipboard.
  </Step>

  <Step title="Create the invoice in your Lightning wallet app">
    Set the amount to exactly the copied figure. A Lightning address (`name@domain`) or an amountless invoice works too. Swaptopia pays the figure to it.
  </Step>

  <Step title="Paste the invoice">
    Paste it in the **Lightning invoice for N sats, or address** field.

    <Frame caption="The field takes an invoice for exactly this figure, or a Lightning address">
      <img src="https://mintcdn.com/second-0659a37d/Ys6dqcbJ8GNgbFCj/images/swaptopia/pending-await-invoice.png?fit=max&auto=format&n=Ys6dqcbJ8GNgbFCj&q=85&s=729863a9370371076e24346f2dd6b8a2" alt="Screenshot of the Create a Lightning invoice stage, with the exact amount to invoice, the Copy amount button, the invoice field, and the Pay button" width="1152" height="1050" data-path="images/swaptopia/pending-await-invoice.png" />
    </Frame>
  </Step>

  <Step title="Select Pay">
    Swaptopia shows **Paying Lightning** while the payment goes out, then the receipt. Keep the tab open until the receipt appears.
  </Step>
</Steps>

<Tip>
  You can close the tab before you paste an invoice. The sats stay in the wallet until you paste one. Swaptopia recalculates the figure each time you reopen the page. Check it again before you create the invoice.
</Tip>

## Read the receipt

The **Paid** screen closes the swap:

* **Amount:** The sats your Lightning wallet app received.
* **Fee paid:** The fees Swaptopia recorded on the swap, in place of the quote's estimate.
* **Preimage:** The proof that the Lightning payment went through.

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

<Frame caption="The receipt shows what your Lightning wallet app received and the fee the swap recorded">
  <img src="https://mintcdn.com/second-0659a37d/Ys6dqcbJ8GNgbFCj/images/swaptopia/success-lightning.png?fit=max&auto=format&n=Ys6dqcbJ8GNgbFCj&q=85&s=bb89dcb3ac7574f3f3b968cbfd1cd620" alt="Screenshot of the Paid screen, with the amount, the route line, the fee paid, the preimage, and the Swap again button" width="1152" height="842" data-path="images/swaptopia/success-lightning.png" />
</Frame>


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