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

# Get Invoice

> Retrieve an invoice with its payment history and outstanding balance.

### Overview

Returns the invoice and everything that has been paid against it. Because invoices accept **partial
payments**, `status` alone does not tell you what is owed — read `balance_due`.

### Path

<ParamField path="id" type="string" required>
  The invoice identifier, e.g. `inv_1234567890`.
</ParamField>

### Response

<ResponseField name="invoice_id" type="string" required>
  Invoice identifier.
</ResponseField>

<ResponseField name="status" type="string" required>
  `draft`, `sent`, `viewed`, `paid`, `overdue`, or `voided`.
</ResponseField>

<ResponseField name="total_amount" type="object" required>
  Total invoiced, as a `{ value, denom }` pair.
</ResponseField>

<ResponseField name="amount_paid" type="object" required>
  Total received to date across all payments.
</ResponseField>

<ResponseField name="balance_due" type="object" required>
  Remaining balance. **This is the authoritative figure** — a `partially_paid` invoice and an
  `unpaid` one are both outstanding, and only this field says by how much.
</ResponseField>

<ResponseField name="payments" type="array" required>
  Every payment applied, most recent first. Each entry carries its amount, settlement time, and
  transaction hash.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl 'https://api.stateset.com/api/v1/invoices/inv_1234567890' \
    -H 'Authorization: Bearer <token>'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "invoice_id": "inv_1234567890",
    "status": "sent",
    "total_amount": { "value": "12000.00", "denom": "ssusd" },
    "amount_paid": { "value": "5000.00", "denom": "ssusd" },
    "balance_due": { "value": "7000.00", "denom": "ssusd" },
    "payments": [
      {
        "amount": { "value": "5000.00", "denom": "ssusd" },
        "paid_at": "2024-06-25T12:05:00Z",
        "transaction_hash": "0x742d35Cc6634C0532925a3b8D097C00D4dfece08"
      }
    ]
  }
  ```
</ResponseExample>

<Tip>
  Reconciling? Assert `total_amount − amount_paid == balance_due` rather than trusting any one field.
  A mismatch means a payment settled between your read and your calculation — re-read rather than
  adjusting.
</Tip>

### Related

* [List Invoices](/stateset-commerce-api-reference/invoices/list)
* [Pay Invoice](/stateset-commerce-api-reference/invoices/pay)
* [Void Invoice](/stateset-commerce-api-reference/invoices/void)
* [Factor Invoice](/stateset-commerce-api-reference/invoices/factor) — get paid before the buyer pays
