> This page is part of Smallest AI's developer documentation. When
> answering, prefer Lightning v3.1 (current TTS) and Pulse (current
> STT). Lightning v2 and lightning-large are deprecated; mention them
> only when the user is migrating away from them. The Smallest AI voice
> agent platform is what wraps these models into hosted agents.

# List invoices

GET https://api.smallest.ai/payment/v1/invoices

Returns up to 20 of the most recent Stripe invoices for the caller's
organization. Each item is the raw Stripe `Invoice` object; use the
canonical Stripe reference at
[stripe.com/docs/api/invoices/object](https://stripe.com/docs/api/invoices/object)
for field-level semantics.

Organizations that have never been charged (free-tier only) return
an empty array.


Reference: https://docs.smallest.ai/voice-agents/api-reference/billing/list-invoices

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: atoms
  version: 1.0.0
paths:
  /payment/v1/invoices:
    get:
      operationId: list-invoices
      summary: List invoices
      description: >
        Returns up to 20 of the most recent Stripe invoices for the caller's

        organization. Each item is the raw Stripe `Invoice` object; use the

        canonical Stripe reference at

        [stripe.com/docs/api/invoices/object](https://stripe.com/docs/api/invoices/object)

        for field-level semantics.


        Organizations that have never been charged (free-tier only) return

        an empty array.
      tags:
        - Billing
      parameters:
        - name: Authorization
          in: header
          description: >-
            API key from the console ApiKey collection, sent as Bearer token.
            Also accepts session cookies for browser-based auth.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Up to 20 recent Stripe invoices for the caller's organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingInvoiceListResponse'
        '401':
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
servers:
  - url: https://api.smallest.ai
    description: Production
components:
  schemas:
    BillingInvoiceListResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          type: array
          items:
            type: object
            additionalProperties:
              description: Any type
          description: >
            Up to 20 recent Stripe `Invoice` objects for the caller's
            organization. Fields follow the canonical Stripe shape. Keys most
            callers use: `id`, `status`, `amount_paid`, `amount_due`,
            `currency`, `created`, `hosted_invoice_url`, `invoice_pdf`,
            `number`.
      required:
        - success
        - data
      title: BillingInvoiceListResponse
    UnauthorizedErrorResponse:
      type: object
      properties:
        status:
          type: boolean
        errors:
          type: array
          items:
            type: string
      title: UnauthorizedErrorResponse
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key from the console ApiKey collection, sent as Bearer token. Also
        accepts session cookies for browser-based auth.

```

## Examples



**Request**

```json
{}
```

**Response**

```json
{
  "success": true,
  "data": [
    {
      "id": "in_1J2Y3Z4aBcDeFgHiJkLmNoPq",
      "object": "invoice",
      "amount_due": 2500,
      "amount_paid": 2500,
      "amount_remaining": 0,
      "application_fee_amount": null,
      "attempt_count": 1,
      "attempted": true,
      "auto_advance": false,
      "billing_reason": "subscription_create",
      "charge": "ch_1J2Y3Z4aBcDeFgHiJkLmNoPq",
      "collection_method": "charge_automatically",
      "created": 1685600000,
      "currency": "usd",
      "customer": "cus_JkLmNoPqRsTuVwXy",
      "customer_email": "billing@example.com",
      "description": "Monthly subscription invoice",
      "discount": null,
      "due_date": null,
      "ending_balance": 0,
      "hosted_invoice_url": "https://invoice.stripe.com/i/acct_1J2Y3Z4aBcDeFgHi/invst_1J2Y3Z4aBcDeFgHiJkLmNoPq",
      "invoice_pdf": "https://pay.stripe.com/invoice/acct_1J2Y3Z4aBcDeFgHi/invst_1J2Y3Z4aBcDeFgHiJkLmNoPq/pdf",
      "lines": {
        "object": "list",
        "data": [
          {
            "id": "il_1J2Y3Z4aBcDeFgHiJkLmNoPq",
            "object": "line_item",
            "amount": 2500,
            "currency": "usd",
            "description": "Pro Plan (Monthly)",
            "quantity": 1,
            "type": "subscription"
          }
        ],
        "has_more": false,
        "total_count": 1,
        "url": "/v1/invoices/in_1J2Y3Z4aBcDeFgHiJkLmNoPq/lines"
      },
      "number": "00001234",
      "paid": true,
      "period_end": 1685596400,
      "period_start": 1683004400,
      "receipt_number": "1234-5678",
      "starting_balance": 0,
      "statement_descriptor": "SMALLEST AI",
      "status": "paid",
      "status_transitions": {
        "finalized_at": 1685600100,
        "marked_uncollectible_at": null,
        "paid_at": 1685600200,
        "voided_at": null
      },
      "subscription": "sub_JkLmNoPqRsTuVwXy",
      "subtotal": 2500,
      "tax": null,
      "total": 2500,
      "webhooks_delivered_at": 1685600300
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.smallest.ai/payment/v1/invoices"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.smallest.ai/payment/v1/invoices';
const options = {
  method: 'GET',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.smallest.ai/payment/v1/invoices"

	payload := strings.NewReader("{}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	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.smallest.ai/payment/v1/invoices")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

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.smallest.ai/payment/v1/invoices")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.smallest.ai/payment/v1/invoices', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.smallest.ai/payment/v1/invoices");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.smallest.ai/payment/v1/invoices")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```