Skip to main content

Prerequisites

To complete this guide, you will need the following:

1. Create a Rust project

2. Install dependencies

Add both the zebedee-rust and tokio crates to your project:

3. Update your Cargo.toml

Update your Cargo.toml file to use full features in tokio.

4. Create a Charge

Open your project’s main.rs file and add the following code:
Make sure to create an environment variable called ZBD_API_KEY in your Rust project. This is the API key you get from your ZBD Project.
Run the following command to create your charge:
You can now create charges using the ZBD and Rust!
Charges and payment requests are usually shown to users as QR codes that can be scanned by mobile apps (e.g. ZBD). Read Callbacks to understand how to receive updates about your payment asynchronously.

5. Try it yourself

You can now begin receiving instant Bitcoin payments with Rust + ZBD!

Rust Example

See the full source code.