Sandbox Projects
Understand the difference between Sandbox and Live Projects.
Now that we’ve created our first Project let’s talk about Sandbox Projects & APIs, vs Live Projects & APIs.
Introduction
Every new Project in the ZBD Dev Dashboard is created as a Sandbox Project by default. This means that the Project is not connected to mainnet Lightning Network, or Bitcoin blockchain, and is not using real Bitcoin. This is a great way to test your integration and make sure everything is working as expected before going live.
When dealing with Sandbox Projects, it is important to remember that the Bitcoin/satoshis/sats displayed are fake money. The purpose of the Sandbox environment is to allow folks to test their integration without having to spend real money. This is why we call it a Sandbox.
When you create your first Sandbox Project you will notice that your Project has a Sandbox
label on it. This is to help you differentiate between Sandbox Projects and Live Projects. Additionally, you will notice that you have 10,000 fake satoshis. This is the default amount of fake satoshis that every Sandbox Project starts with.
Sandbox Testing Users
One other differentiation between Sandbox and Live Projects is the existence of Test Users. Test Users are a special type of user that can be used to test your integration. Test Users are not real users, and they do not have real Bitcoin. They are simply a way to test your integration without having to create a real user.
Test Users are pre-created for every new Sandbox Project. You can view your Test Users by clicking on the Test Users
tab in your Project.
Topping Up Sandbox Wallet
If you ever find yourself running low on fake satoshis you can always top up your Sandbox Wallet. To do this, simply click on the Top Up
button in your Project’s quick actions module on the right-hand side.
Sandbox API Endpoints
As is expected, Sandbox Projects have their own Sandbox APIs and API Keys. These APIs are identical to the Live APIs, except that they are not connected to mainnet Bitcoin Lightning Network. This means that you can test your integration without having to spend real money.
You can view all Sandbox APIs by heading over to the Sandbox API Reference page.
Sending Bitcoin to a Sandbox ZBD Gamertag
Now that we have a clear understanding of Sandbox Projects and Sandbox APIs, let’s test our integration by sending some fake satoshis to our Sandbox Test Users.
First of, start by copying the Sandbox API Key
from your Project’s API tab.
Now that we have our Sandbox API Key, let’s use the Send Bitcoin to ZBD Gamertag Sandbox API to send some fake satoshis to our Sandbox Test User.
You may write your own HTTP client to do this test, but the simplest way is to use the API Playground Module available in the ZBD API Reference. On every API Reference page you will find a ZBD API Playground Module on the right-hand side that you can use to directly test an API endpoint by providing it an API Key and a payload (if necessary).
Replace YOUR_API_KEY_HERE with your Sandbox API Key
Head on over to the API Reference page and enter your Sandbox API Key and one of your Test User’s ZBD Gamertag. Then click on the Send Request
button on the top right.
If successful the API will return a success: true
payload, it means you successfully sent Bitcoin!
Returning to the ZBD Dev Dashboard, you will notice that your Sandbox Wallet has been debited by the amount of fake satoshis you sent to your Test User and that a new transaction is now reflected in the Transactions table.
Click on the transaction to view the transaction details for more information around settlement time, fees incurred, etc.
Next Steps
You have just used the Send Bitcoin to ZBD Gamertag Sandbox API to send fake satoshis to your Sandbox Test User.
Was this page helpful?