Developer Guide
Sending
10min
This guide explains how to send Lightning Network payments using the Voltage API.
- A Voltage account with an active wallet
- An API key (get this from the "API Keys" page in your dashboard)
- id: A unique identifier for the payment
- wallet_id: The ID of the wallet sending the payment
- currency: Currently only "btc" is supported
- type: Currently only "bolt11" is supported
- data.payment_request: The Lightning invoice you want to pay
- data.amount_msats: Payment amount in millisatoshis
- data.max_fee_msats: Maximum routing fee you're willing to pay
After sending a payment, monitor its status using:
The payment will transition through these states:
- sending: Payment is in progress
- completed: Payment was successful
- failed: Payment failed (check error field for details)
Common HTTP status codes:
- 200: Success
- 400: Invalid request (check error message)
- 403: Authentication error
- 404: Payment not found
- 500: Server error