Developer Guide

Staging Environment

16min
staging environment the voltage payments staging environment provides a safe, sandbox environment for testing your lightning network integrations using mutinynet, a global bitcoin signet this guide will help you understand how to use the staging environment effectively overview the staging environment allows you to test lightning network payment functionality without real funds develop and validate your integration before moving to production access automatic line of credit for testing experiment with the api without financial risk getting started base url all api requests for staging and mainnet environments should be made to https //voltageapi com/v1 authentication navigate to the "api keys" page in your dashboard generate a new api key specifically for the staging environment include your api key in requests using the x api key header staging wallets automatic line of credit when using mutinynet, your organization automatically receives a line of credit for testing purposes unlike mainnet no application process is required no collateral or bank verification needed no billing cycles or payments to manage how the line of credit works automatic creation a line of credit is automatically created when you create your first mutinynet environment wallet credit limit each mutinynet environment comes with a 1 btc default credit limit finding your line of credit id your line of credit id is displayed on the api keys page in your dashboard for convenient access wallet creation wallets created through the ui have a default limit of 0 05 btc when creating wallets through the api, you can set any limit value as long as there's enough allocation left in your line of credit automatic expansion if you need additional credit for testing, creating a new wallet through the dashboard ui will automatically expand your line of credit with an additional 1 btc buffer deleting wallets when a wallet is deleted, its allocation is freed up within the line of credit, but the total line of credit limit remains unchanged creating a staging wallet to create a new staging wallet, you'll need your organization id your environment id your line of credit id (found in the ui) example request curl 'https //voltageapi com/api/v1/organizations/{organization id}/wallets' \\ \ request post \\ \ data '{ "environment id" "{environment id}", "id" "7a68a525 9d11 4c1e a3dd 1c2bf1378ba2", # uuid you generate "line of credit id" "your line of credit id", "limit" 100000000, "metadata" { "tag" "testing wallet" }, "name" "my first wallet", "network" "mutinynet" }' testing payments sending payments you can test sending payments without worrying about real funds or billing cycles the staging environment allows you to send test lightning payments experiment with different payment amounts test error handling and payment states receiving payments the staging environment supports full testing of payment receiving functionality generate test invoices monitor payment status changes payment status flow monitor payment status transitions in your staging environment for sent payments sending → completed or failed for received payments receiving → completed or failed best practices environment separation use different api keys for staging and production clearly label test wallets and payments use meaningful metadata for testing scenarios testing scenarios test both successful and failed payment flows validate error handling test payment status monitoring monitoring regularly check wallet balances monitor payment history test api response handling limitations while the staging environment closely mirrors production functionality, be aware of these differences uses mutinynet instead of mainnet bitcoin no real funds are involved no billing cycles or invoices automatic line of credit approval may have different rate limits than production moving to production when you're ready to move to production submit a mainnet application complete the approval process set up required collateral or bank verification generate new api keys for production update your integration to use production endpoints