> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.transxact.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.transxact.io/_mcp/server.

# List Invoices

GET https://api.transxact.io/v1/invoices

Lists your Invoices in the key's mode, newest first. To page, pass the last `id` you got as `starting_after` while `hasMore` is true.

Reference: https://docs.transxact.io/api-reference/invoices/list

## Authentication

- `Authorization` header (bearer token, required) — Your secret key: sk_test_... in Test mode, sk_live_... in Live mode.

## Request

### Query parameters

- `limit` (integer, optional) — 1 to 100; defaults to 10.
- `starting_after` (integer, optional) — An Invoice `id`; returns the Invoices older than it.

## Response

### 200

A page of Invoices.

- `data` (list of Invoice, required) — This page of Invoices.
- `hasMore` (boolean, required) — True if older Invoices follow.

## Errors

### 401 Unauthorized Error

Invalid or missing API key.

- `error` (ErrorError, required) — Branch on `code`; `message` is for logs.

### 403 Forbidden Error

The account is not a Business account (`business_only`).

- `error` (ErrorError, required) — Branch on `code`; `message` is for logs.

## Types

### Invoice

- `id` (integer, required) — Invoice identifier.
- `number` (string, required, nullable) — The Invoice number, such as `INV-0007`. Assigned when the Invoice is sent, so a draft has none; numbers are never reused.
- `status` (enum, required) — `draft` until sent and editable only from the dashboard. `sent`: the Customer can pay it. `paid`: paid in full. `void`: you voided it; it can no longer be paid.
  - Allowed values: `draft`, `sent`, `paid`, `void`
- `overdue` (boolean, required) — A sent, unpaid Invoice past its due date (Pacific/Fiji). Derived, not a status; the Customer can still pay.
- `mode` (enum, required) — `test` for an Invoice made with an `sk_test_` key, `live` for an `sk_live_` key.
  - Allowed values: `test`, `live`
- `customerName` (string, required) — Who you billed.
- `customerEmail` (string, required, nullable) — The Customer's email, if you gave one.
- `items` (list of InvoiceItem, required) — The line items, excluding tax.
- `taxLabel` (string, required, nullable) — Label of the tax line; null if none.
- `taxPercent` (double, required) — 0 when there is no tax line.
- `vatNumber` (string, required, nullable) — Your VAT number, if you gave one.
- `dueDate` (string, required) — `YYYY-MM-DD`, Pacific/Fiji.
- `subtotal` (integer, required) — Sum of the line items, in FJD cents (minor units).
- `tax` (integer, required) — The tax line, in FJD cents (minor units).
- `total` (integer, required) — Amount due; under FJD 5,000.00, in FJD cents (minor units).
- `url` (string, required) — The hosted page the Customer opens and pays on. Works once the Invoice is sent.
- `pdfUrl` (string, required, nullable) — Where to `GET` the PDF, with your secret key. Null on a draft.
- `createdAt` (integer, required) — Unix ms timestamp the draft was created.
- `sentAt` (integer, required, nullable) — Unix ms timestamp it was sent; null on a draft.
- `paidAt` (integer, required, nullable) — Unix ms timestamp it was paid; null until then.

### ErrorError

Branch on `code`; `message` is for logs.

- `code` (string, required) — Stable machine-readable error code.
- `message` (string, required) — Human-readable detail, not contractual.

### InvoiceItem

- `description` (string, required) — What it is, up to 200 characters.
- `quantity` (integer, required) — Whole units, 1 to 9999.
- `unitPrice` (integer, required) — Price of one unit, excluding tax, in FJD cents (minor units).

## Examples

**Response**

```json
{
  "data": [
    {
      "id": 42,
      "number": "INV-0007",
      "status": "sent",
      "overdue": false,
      "mode": "test",
      "customerName": "Mere Tuilagi",
      "customerEmail": "mere@example.com",
      "items": [
        {
          "description": "Tiling, kitchen",
          "quantity": 2,
          "unitPrice": 12000
        }
      ],
      "taxLabel": "VAT",
      "taxPercent": 15,
      "vatNumber": null,
      "dueDate": "2026-11-30",
      "subtotal": 24000,
      "tax": 3600,
      "total": 27600,
      "url": "https://transxact.io/i/k3j2h1g0f9e8d7c6",
      "pdfUrl": "https://api.transxact.io/v1/invoices/42/pdf",
      "createdAt": 1717086400000,
      "sentAt": 1717086400000,
      "paidAt": null
    }
  ],
  "hasMore": true
}
```

**SDK Code**

```python
import requests

url = "https://api.transxact.io/v1/invoices"

querystring = {"limit":"10","starting_after":"42"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.transxact.io/v1/invoices?limit=10&starting_after=42';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.transxact.io/v1/invoices?limit=10&starting_after=42"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.transxact.io/v1/invoices?limit=10&starting_after=42")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.transxact.io/v1/invoices?limit=10&starting_after=42")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.transxact.io/v1/invoices?limit=10&starting_after=42', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.transxact.io/v1/invoices?limit=10&starting_after=42");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.transxact.io/v1/invoices?limit=10&starting_after=42")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```