Voltage icon

Voltage

Interact with Voltage API

Overview

This node integrates with the Voltage API to create a payment request (invoice) within a specified wallet and environment. It supports creating different types of payment requests such as Lightning Network invoices, on-chain Bitcoin payments, or unified BIP21 payments. The node waits for the payment request to be ready before returning the result.

Common scenarios where this node is beneficial include:

  • Generating Lightning invoices for instant Bitcoin payments.
  • Creating on-chain Bitcoin payment requests for traditional blockchain transactions.
  • Offering flexible payment options by generating BIP21 URIs that support both Lightning and on-chain payments.

Practical example:

  • A merchant wants to generate a Lightning invoice for a customer to pay instantly. They use this node to create a Lightning payment request specifying the wallet, amount, and description. Once created, the invoice can be sent to the customer for payment.

Properties

Name Meaning
Organization ID The unique identifier of the organization under which the payment request is created.
Environment ID The environment ID related to the payment context (e.g., production or test environment).
Wallet ID The wallet ID from which the payment request will be generated.
Payment Kind Type of payment to create. Options: Lightning (Bolt11), On-chain Bitcoin, or BIP21 (unified).
Currency Currency for the payment request. Options: BTC (Bitcoin), USD (US Dollar).
Amount (millisats) Amount in millisatoshis (1 satoshi = 1000 millisats). Leave empty to create an "any amount" invoice.
Description Optional description text for the payment request.
Additional Options Collection of optional parameters controlling polling behavior:
- Max Polling Attempts: Maximum number of times to poll for payment readiness.
- Polling Interval (ms): Time interval between polling attempts in milliseconds.
- Timeout (ms): Total timeout duration for polling in milliseconds.

Output

The node outputs JSON data representing the created payment request. This includes details such as:

  • Payment request identifiers.
  • Invoice strings (e.g., Bolt11 invoice).
  • Status and metadata about the payment request.
  • Any relevant URLs or payment URIs for the requested payment kind.

The output is structured as one JSON object per input item, paired accordingly.

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential for authenticating with the Voltage API.
  • The node uses the Voltage API SDK internally to communicate with the service.
  • Proper configuration of the API key and base URL (if custom) is necessary in n8n credentials.
  • The organization ID and environment ID must correspond to valid entities in the Voltage platform.

Troubleshooting

Common Issues

  • Invalid API Key or Credentials: If authentication fails, ensure the API key is correct and has appropriate permissions.
  • Incorrect Organization or Environment ID: Using invalid or non-existent IDs will cause "Not Found" errors.
  • Validation Errors: Providing invalid parameters (e.g., negative amounts, unsupported currencies) results in validation errors.
  • Timeouts: Polling for payment readiness may time out if the payment request does not become ready within the specified timeout.

Error Messages and Resolutions

  • Validation Error (422): Indicates invalid request data. Check all parameters for correctness.
  • Authentication Error (401): Invalid API key or missing credentials. Verify API key setup.
  • Permission Error (403): API key lacks required permissions. Adjust API key scopes.
  • Not Found (404): Organization, environment, or resource not found. Confirm IDs are correct.
  • Server Error (5xx): Voltage API server issues. Retry later or contact support.
  • Failed to parse response as JSON: Usually indicates authentication failure or incorrect organization ID. Double-check credentials and IDs.

If the node is set to continue on fail, error details will be included in the output JSON for each failed item.

Links and References

Discussion