Developer Guide
Wallet Management
13 min
this guide walks you through everything you need to go from "i just logged in" to "i'm ready to make my first api call " by the end you will have created an environment to organize your work created your first wallet to hold funds generated an api key with the right permissions located the developer credentials every api call requires understood the difference between staging and production if you went through voltage sales, you may already have an environment and wallet set up for you if so, you can skip ahead to generate api keys & find credentials below or proceed directly to the developer guide key concepts environment — an organizational container that separates testing from production workflows each environment has its own wallets and api keys, so staging activity never touches production wallet — where your funds and credit balances are managed wallets are denominated in either btc or usd btc wallets can send and receive directly; usd wallets require a quote from the quotes api to convert between usd and btc at the time of payment line of credit — the credit allocation that funds your wallets each wallet draws against a shared line of credit in staging (mutinynet), a line of credit is automatically provisioned when you create your first wallet for mainnet, a line of credit is granted through an application process api key — an environment specific secret used to authenticate api requests keys are sent via the x api key header and can be created with different permission levels read , write , and billing organization — your top level account container every api path includes your organization id , and all environments, wallets, and keys live under it staging vs production we recommend starting with a staging environment using mutinynet (a bitcoin signet) staging gives you no real funds at risk an automatic line of credit (no application required) the same api endpoints and behavior as production when you're ready for real payments, production offers two paths credit backed — voltage provides the infrastructure and a line of credit best for most businesses see docid\ kd563u5vevsbcaymvcan node backed — enterprise plan you bring your own lightning node see docid\ smmi0 ukgfgdchtsztlu5 mainnet applications are currently closed start with staging to build and test your integration now create your environment an environment groups your wallets, api keys, and payment activity you'll typically have at least one staging environment and one production environment step 1 once you are logged in to your account, click the new environment button step 2 give your environment a descriptive name (e g , "staging" or "production") step 3 after the environment is created, click go to environment to enter it create your first wallet inside your environment, you'll create a wallet to hold funds and process payments step 1 from the environment dashboard, click add new wallet the manage environment menu also gives you options for environment settings step 2 give your wallet a custom name or choose a randomly generated one, then click continue step 3 choose your wallet type and click create development (mutinynet) — for staging and testing uses test bitcoin with no real value this is the recommended starting point mainnet — for production with real bitcoin requires an approved mainnet application each wallet created through the ui receives a default credit allocation of 0 05 btc from your line of credit (which starts at 1 btc total for mutinynet environments) you can create additional wallets with custom limits via the api btc vs usd wallets btc wallets send and receive bitcoin directly usd wallets require a quote from the quotes api to handle the btc↔usd conversion for details, see the and guides step 4 your wallet is created and ready to use a line of credit was automatically created alongside your first mutinynet wallet you'll need the line of credit id when creating additional wallets via the api you can find it on the api keys page (see next section) generate api keys & find credentials before making api calls, you need an api key and several ids this section shows you where to find everything generate an api key navigate to the api keys page in your environment dashboard click create api key , give it a name, and select the permission levels you need read — list and inspect wallets, payments, and other resources write — create wallets, send/receive payments billing — access billing and line of credit operations copy your api key immediately after creation — you won't be able to view it again store it securely find your developer credentials every api call requires at least your organization id most calls also require environment id , wallet id , or line of credit id here's where to find them api keys sidebar click on any api key to open the sidebar this shows your organization id , environment id , and line of credit id developer modal click the developer button in the top right corner of the dashboard to open the developer modal, which lists all your credentials in one place your first api call with your api key and organization id in hand, verify everything works by listing your wallets curl 'https //voltageapi com/v1/organizations/{organization id}/wallets' \\ \ header 'x api key your api key' a successful response returns a json array of your wallets, including their ids, balances, and metadata if you see your wallet in the response, you're ready to start building what's next now that your environment, wallet, and api credentials are set up, choose your next step send a payment → docid\ ijeswowxjhpgyt6fv1kk1 receive a payment → docid uq9knquoc9sgq0kuogmy test in staging → docid\ tx3a0756sgvqai9kpacbi set up webhooks → docid\ pdeh 4et9aqawca5q91na go to production → docid\ kd563u5vevsbcaymvcan or docid\ smmi0 ukgfgdchtsztlu5 full api reference → https //voltageapi com/v1/docs quick reference true 258,259 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type