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

# C# SDK

> Learn how to send and receive instant Bitcoin payments with C# and ZBD.

## Prerequisites

To complete this guide, you will need the following:

* [ZBD Project with a Live API key](/get-started/api-keys)
* [Visual Studio](https://visualstudio.microsoft.com/downloads/)

## 1. Create project

Create a new project or open an existing project in Visual Studio.

## 2. Install the ZBD NuGet package

NuGet package name: `dev.zbd.csharp`

<CodeGroup>
  ```bash Package Manager theme={null}
  NuGet\Install-Package dev.zbd.csharp 
  ```

  ```bash .NET CLI theme={null}
  dotnet add package dev.zbd.csharp 
  ```

  ```xml Package Reference theme={null}
  <PackageReference Include="dev.zbd.csharp" Version="0.1.1" />
  ```
</CodeGroup>

## 3. Send and receive Bitcoin

The below code is an example of how you can create a charge.

```csharp theme={null}
using ZebedeeAPI;

var handler = new ZebedeeHandler("<YOUR_ZBD_API_KEY>");

var charge =
    await handler.CreateCharge(
        expiresIn: "10000", 
        amount: "100000", 
        description: "A Charge Created with ZBD!"
    );

Console.WriteLine(charge.data.invoice.request);
```

You're looking for the `data.invoice.request` property in the JSON response. It starts with `lnbc1` and is the payment request anyone in the Bitcoin Lightning Network can use to pay you.

```
lnbc1u1pjdlax9pp5t7jhkd7h2wntd4f2v7xp22dknmjxp0q8nm7hfcny4p7a5mr7x3rsdp9f4hkueteypshggrfde6x2unwv46zqumsv4jkgcqzzsxqzjcsp5dsayu6m6632p28rnkeeqsr7d54amrkv6wh46yrv42gdgca8xl8gs9qyyssqgj2zrkax733rzulfkzc5mqsr8fpwrva82stpa7e0frw32722trv37jlq8mvlqfp8y75lr6mz63zd7qnxar8hhsehuy22pvfq6wjxwqqqa60lx3
```

<Info>Charges and payment requests are usually shown to users as QR codes that can be scanned by mobile apps (e.g. [ZBD](https://zbd.one/download)). Read [Callbacks](/payments/api/callbacks) to understand how to receive updates about your payment asynchronously.</Info>
