> ## Documentation Index
> Fetch the complete documentation index at: https://docs.settlx.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Invoice

> Retrieve a single invoice by ID, including any generated payment addresses

# Get Invoice

Retrieves a single invoice by its ID. The response includes any payment addresses that have been generated for this invoice (i.e., chains/tokens the customer has selected on the checkout page).

## Path Parameters

<ParamField path="id" type="string" required>
  UUID of the invoice.
</ParamField>

## Response

<ResponseField name="data" type="object">
  <Expandable title="Invoice object with addresses">
    <ResponseField name="id" type="string">UUID of the invoice</ResponseField>
    <ResponseField name="merchantId" type="string">UUID of your merchant account</ResponseField>
    <ResponseField name="amount" type="string">Invoice amount</ResponseField>
    <ResponseField name="currency" type="string">Invoice currency</ResponseField>

    <ResponseField name="status" type="string">
      Current invoice status. One of: `pending`, `confirmed`, `settled`, `expired`
    </ResponseField>

    <ResponseField name="description" type="string | null">Invoice description</ResponseField>
    <ResponseField name="expiresAt" type="string | null">ISO 8601 expiry timestamp</ResponseField>
    <ResponseField name="webhookUrl" type="string | null">Webhook URL</ResponseField>
    <ResponseField name="paymentUrl" type="string">Hosted checkout URL</ResponseField>

    <ResponseField name="addresses" type="array">
      Payment addresses generated for this invoice. One entry per chain/token combination selected by the customer.

      Each address object contains:

      * `currency` — token symbol (e.g. `USDT`)
      * `chain` — chain name (e.g. `ethereum`)
      * `address` — payment address
      * `qrCode` — base64-encoded QR code PNG
    </ResponseField>

    <ResponseField name="createdAt" type="string">ISO 8601 creation timestamp</ResponseField>
    <ResponseField name="updatedAt" type="string">ISO 8601 last-updated timestamp</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.settlx.io/api/v1/invoices/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
    -H "Authorization: Bearer pk_live_your_api_key"
  ```

  ```javascript Node.js theme={null}
  const invoiceId = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890';
  const response = await fetch(`https://api.settlx.io/api/v1/invoices/${invoiceId}`, {
    headers: { 'Authorization': 'Bearer pk_live_your_api_key' }
  });
  const { data } = await response.json();
  console.log(data.status);
  ```

  ```python Python theme={null}
  import httpx

  client = httpx.Client(headers={"Authorization": "Bearer pk_live_your_api_key"})
  invoice_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  response = client.get(f"https://api.settlx.io/api/v1/invoices/{invoice_id}")
  invoice = response.json()["data"]
  print(invoice["status"])
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "merchantId": "f9e8d7c6-b5a4-3210-9876-543210fedcba",
      "amount": "99.99",
      "currency": "USD",
      "status": "confirmed",
      "description": "Order #1234",
      "expiresAt": "2024-01-15T10:30:00.000Z",
      "webhookUrl": "https://yoursite.com/webhooks/settlx",
      "paymentUrl": "https://api.settlx.io/checkout/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "addresses": [
        {
          "currency": "USDT",
          "chain": "ethereum",
          "address": "0xABCDEF1234567890abcdef1234567890ABCDEF12",
          "qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
        }
      ],
      "createdAt": "2024-01-15T10:00:00.000Z",
      "updatedAt": "2024-01-15T10:03:00.000Z"
    }
  }
  ```

  ```json 404 theme={null}
  {
    "error": "Not Found",
    "message": "Invoice not found"
  }
  ```
</ResponseExample>
