Developer Guide

The Voltage API enables you to integrate Lightning Network functionality into your applications. This guide will walk you through common tasks and help you get started with the API.
If you are starting here we are assuming that you already have a team and a staging wallet setup for you. If you do not, the Wallet Setup Guide will get you ready.
The Voltage API uses x-api-key authentication methods for API calls:
- API Key Authentication (via x-api-key header):
You can manage your API keys by visiting your team page and clicking on "API Keys"

Be sure to select the correct Environment for your API key when generating and give it a descriptive name.

The payment flow for receiving payments follows these steps:
Important: The payment creation endpoint returns a 202 status code on success, indicating the request was accepted. You must then fetch the payment details separately to get the invoice and monitor its status.
Example Payment Details Response
The payment flow for sending payments follows these steps:
Important: Like the receive flow, the send payment endpoint returns a 202 status code on success. You must fetch the payment details separately to monitor its status.
When sending or receiving payments, you must actively monitor the payment status by fetching the payment details. The status field will progress through these states:
- For sent payments:
- Initial: sending
- Final: completed or failed
- For received payments:
- Initial: receiving
- Final: completed or failed
Best practices for monitoring:
- Poll the payment status endpoint every few seconds
- Implement appropriate timeout logic
- Handle both success and error states
- Consider implementing webhook notifications for status changes
Example of checking payment status:
Regularly check wallet balances to ensure sufficient funds:
Track payment history and events:
In order to create a Staging Wallet through the API you must have already created your first wallet through the UI. Doing this will autmatically generated you a line of credit ID that you can use to start creating new wallets through the API.



Great! You now have the info required to make the request BELOW and create staging wallets through the API.
Add custom metadata to wallets for better organization:
The API uses standard HTTP status codes:
- 200: Success
- 201: Resource created
- 202: Successfully requested a new payment be created
- 400: Bad request
- 403: Authentication/authorization error
- 404: Resource not found
- 500: Server error
Always check the response status and handle errors appropriately.
For additional support:
Remember to always use appropriate error handling and logging in your integration to ensure reliable operation of your Lightning Network payments.