# Voltage Payments API

# API Specification

The full Voltage Pay OpenAPI spec can be found at the link below:

[https://voltageapi.com/v1/docs](https://voltageapi.com/v1/docs)

# Core Resource Categories

## 1. Wallets

**Wallets**

Wallets are where your funds and credit balances are managed. In Development, use **Mutinynet Bitcoin** for Node-backed or Credit-backed Bitcoin, **Mutinynet USD** for USD line-of-credit testing, and **Voltage Cash** only for experimental stablecoin testing. Voltage Cash is not currently live because the intended Tether-backed asset has not yet been minted. See [Wallet Setup Guide](/wallet-setup-guide) for the current selection workflow.

The API
allows you to:

- **List wallets** - View all wallets in an organization
  - `GET /organizations/{organization_id}/wallets`
- **Create wallets** - Set up new wallets in development or production
  environments
  - `POST /organizations/{organization_id}/wallets`
- **Retrieve wallet details** - Get balance information and status for a
  specific wallet
  - `GET /organizations/{organization_id}/wallets/{wallet_id}`
- **Delete wallets** - Remove wallets when no longer needed
  - `DELETE /organizations/{organization_id}/wallets/{wallet_id}`
- **View transaction history** - Access the ledger of all transactions for
  a wallet
  - `GET /organizations/{organization_id}/wallets/{wallet_id}/ledger`

## 2. Payments

**Payments**

The payments API enables sending and receiving Bitcoin payments via
Lightning Network. Key operations include:

- **List payments** - View payment history with filtering options
  - `GET`
    `/organizations/{organization_id}/environments/{environment_id}/payments`
- **Create payments** - Initiate new send or receive payments
  - `POST`
    `/organizations/{organization_id}/environments/{environment_id}/payments`
- **Get payment details** - Retrieve information about a specific
  payment
  - `GET`
    `/organizations/{organization_id}/environments/{environment_id}/payments/{payment_id}`
- **Track payment history** - View the full lifecycle of a payment
  - `GET`
    `/organizations/{organization_id}/environments/{environment_id}/payments/{payment_id}/history`

**Detailed Guides:**

- [Sending](/sending) | [Sending (USD Line of Credit)](/sending-usd-line-of-credit) | [Sending (BTC Line of Credit)](/sending-btc-line-of-credit)
- [Receiving](/receiving) | [Receiving (USD Line of Credit)](/receiving-usd-line-of-credit) | [Receiving (BTC Line of Credit)](/receiving-btc-line-of-credit)

## 3. Quotes

**Quotes**

The Quotes API is used to lock in exchange rates for USD wallet conversions. Key operations include:

- **Create a quote** - Lock in a BTC↔USD conversion rate
  - `POST`
    `/organizations/{organization_id}/environments/{environment_id}/quotes`
- **Get quote details** - Retrieve information about a specific quote
  - `GET`
    `/organizations/{organization_id}/environments/{environment_id}/quotes/{quote_id}`

:::note
**When to use Quotes:** Quotes are required for USD wallet payments (both sending and receiving). BTC wallets do not require quotes.
:::

## 4. Lines of Credit

**Lines of Credit**

The credit system is central to Voltage Payments. Lines of credit can be denominated in either **BTC** or **USD**:

- **BTC Line of Credit** - Wallets operate directly in BTC. No quotes required for payments.
- **USD Line of Credit** - Wallets operate in USD with automatic BTC conversion. Quotes required for payments.

The API allows you to:

- **View credit summary** - Get details about your available credit
  line
  - `GET`
    `/organizations/{organization_id}/lines_of_credit/{line_id}/summary`
- **View all credit lines** - List all lines of credit across your
  organization
  - `GET /organizations/{organization_id}/lines_of_credit/summaries`

**Note:** For staging, lines of credit are automatically created after you
create your first wallet, read about it
[Developer Guide](/developer-guide).

# Common Parameters

Most endpoints share similar parameter patterns:

- **Organization ID** - Required for all operations
- **Environment ID** - Distinguishes between development and production
  environments
- **Wallet ID** - Identifies specific wallets

# Authentication

The Voltage API uses x-api-key authentication methods for API calls:

- **API Key Authentication** (via x-api-key header):

> \--header 'x-api-key: YOUR\_API\_KEY'

# Response Formats

The API consistently returns:

- **200/202** - Successful operations
- **400** - Badly formatted requests
- **403** - Permission errors (READ/WRITE access controls)
- **404** - Resource not found
- **500** - Server errors
