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

# How Does moneydevkit Work?

> FAQs and more information for people who want to know what's going on behind the scenes.

# What is moneydevkit?

moneydevkit is an easy to use developer tool that provides fast global payments for any app. Under the hood, moneydevkit uses  <Tooltip tip="We never have access to your funds">self-custodial</Tooltip> Bitcoin lightning payments. Self-custodial means we never hold or have access to your funds, you control your keys.

## What is Bitcoin?

Bitcoin is a trustless, peer to peer, global electronic cash system. Read more about Bitcoin [here](https://bitcoincore.org/bitcoin.pdf).

## What is lightning?

Lightning is a trustless, peer to peer, "Layer 2" built on top of Bitcoin. It keeps the trustless and self-custody properties of Bitcoin while making transactions nearly instant, private, and hugely scalable. Read more about Lightning [here](https://lightning.network).

## Why Bitcoin and Lightning?

Bitcoin is the most global, accessible digital cash we have, it is truly native internet money. Lightning makes Bitcoin move quickly, the way you expect payments to run.\
\
For people who use moneydevkit, accepting lightning payments means that anyone with a lightning enabled wallet or app will be able to pay you. For example, any of CashApp's 58M active users have the ability to pay a moneydevkit checkout seamlessly. Most importantly, since moneydevkit is self-custodial, anyone can use moneydevkit.

# What's going on behind the scenes?

When you add moneydevkit to your project, you're adding a library that's harnessing Spiral's [Lightning Dev Kit](https://lightningdevkit.org). Lightning dev kit is a very flexible and modular way to implement lightning payments. Our NextJS package is serverless, and we think one of the first truly serverless implementations of lightning.

## When your first customer begins the checkout flow

moneydevkit spins up a serverless lightning node and creates an invoice, that is added to our pre-built checkout page.

## When your customer sends a lightning payment

1. Our infrastructure reaches out to your website via webhook letting your serverless node know a payment is incoming.
2. Your serverless node spins up and accepts the payment
3. Checkout is completed and your serverless node spins down

# How is moneydevkit self-custodial?

Your keys and wallet are tied to `MDK_MNEMONIC`. This is why it's very important to keep your mnemonic backed up and safe.

<Info>
  moneydevkit employees will never ask you for your mnemonic. Never give anyone your mnemonic.
</Info>

Your serverless lightning node is entirely hosted on your website's infrastructure. At no point do we have access to your keys or money, and we don't have the ability to stop or redirect your payments.

## Do I have to worry about nodes, lightning channels, or liquidity?

No. Behind the scenes, we open lightning channels to your serverless node and make sure you have enough liquidity to receive payments.

## How can I recover if something goes wrong?

Your mnemonic will allow you to recover locally if something happens. We will release an easy to use advanced recovery tool that you can use locally soon.
