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

# List invoices

GET https://api.md.tiankii.com/v1/invoice

## List invoices

Returns a paginated list of invoices for the authenticated merchant, filterable by status, date range, app and payment/LNURL request ids.

### Auth
`x-api-key` header with **`Merchant.invoice.read`**. Also accepts JWT user and limited JWT user tokens.

### Filtering conventions
- `Status` uses enum-filter syntax: a bare value (`new`) or an operator form such as `in:new,complete`.
- `start_at` / `end_at` must be supplied together (each requires the other) and are parsed as date-times.
- `include` selects extra attributes to embed in each invoice (repeatable / array).
- `sort` accepts one or more of the allowed order fields.
- Pagination via `page` (default 1) and `per_page` (default 10).

---
**Notas:** FilterInvoiceDto extends FilterDateDto (which extends PaginationDto), so date-range and pagination params are inherited. Field names are PascalCase to match the Prisma Invoices model.

Reference: https://docs.tiankii.com/api-reference/tiankii-api-api-key/invoice/list

## Authentication

- `x-api-key` header (required)

## Request

### Query parameters

- `page` (integer, optional, default: 1) — Page number to return.
- `per_page` (integer, optional, default: 10) — Number of records per page.
- `start_at` (datetime, optional) — Start of the `Created` date range (ISO 8601). Must be sent together with `end_at` — supplying only one is a validation error.
- `end_at` (datetime, optional) — End of the `Created` date range (ISO 8601). Must be sent together with `start_at`.
- `Status` (string, optional) — Filter by checkout invoice status. **Allowed values:** `new`, `invalid`, `expired`, `complete`, `paid` **Allowed operators:** `equals`, `in`, `not`, `notIn` **Formats:** `value` (defaults to `equals`), `operator:value`, `operator|value`, a comma-separated list for `in` / `notIn` (`in:a,b`), or a JSON object (`{"in":["a","b"]}`).
- `Archived` (boolean, optional) — Return only archived (`true`) or unarchived (`false`) charges.
- `AppId` (string, optional) — Return only charges belonging to this app / terminal.
- `PaymentRequestId` (string, optional) — Return only charges generated by this payment request.
- `LnurlpRequestId` (string, optional) — Return only charges generated by this LNURL-pay request.
- `sort` (string, optional) — Sort by one or more fields, comma-separated. **Allowed fields:** `Status`, `Created`, `AppId`, `PaymentRequestId`, `Archived` **Formats:** `field` (ascending by default), `+field`, `-field`, `field:asc`, `field:desc` (`|` also works as the separator).
- `include` (enum, optional) — Extra attributes to embed in each charge. Repeat the parameter to request several. **Allowed values:** `buyer.all`, `buyer.contact`, `pos_data`, `pos_data.json`, `summary`, `app`, `refund`
  - Allowed values: `buyer.all`, `buyer.contact`, `pos_data`, `pos_data.json`, `summary`, `app`, `refund`

### Headers

- `x-application-account-id` (string, optional) — Scope the request to a specific store / account instead of the one resolved from the API key. Aliases: the `x-account-id` header, or the `application_account_id` / `account_id` query parameter.

## Examples

**SDK Code**

```python
import requests

url = "https://api.md.tiankii.com/v1/invoice"

querystring = {"AppId":"app_4f21c9","LnurlpRequestId":"lnurlp_18ab3c","PaymentRequestId":"9c0a1b2d-3e4f-4a5b-8c9d-0e1f2a3b4c5d","Status":"in:new,complete","end_at":"2026-01-31T23:59:59Z","sort":"-Created","start_at":"2026-01-01T00:00:00Z"}

headers = {
    "x-application-account-id": "acct_3f9a21c7",
    "x-api-key": "<apiKey>"
}

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

print(response.json())
```

```javascript
const url = 'https://api.md.tiankii.com/v1/invoice?AppId=app_4f21c9&LnurlpRequestId=lnurlp_18ab3c&PaymentRequestId=9c0a1b2d-3e4f-4a5b-8c9d-0e1f2a3b4c5d&Status=in%3Anew%2Ccomplete&end_at=2026-01-31T23%3A59%3A59Z&sort=-Created&start_at=2026-01-01T00%3A00%3A00Z';
const options = {
  method: 'GET',
  headers: {'x-application-account-id': 'acct_3f9a21c7', 'x-api-key': '<apiKey>'}
};

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.md.tiankii.com/v1/invoice?AppId=app_4f21c9&LnurlpRequestId=lnurlp_18ab3c&PaymentRequestId=9c0a1b2d-3e4f-4a5b-8c9d-0e1f2a3b4c5d&Status=in%3Anew%2Ccomplete&end_at=2026-01-31T23%3A59%3A59Z&sort=-Created&start_at=2026-01-01T00%3A00%3A00Z"

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

	req.Header.Add("x-application-account-id", "acct_3f9a21c7")
	req.Header.Add("x-api-key", "<apiKey>")

	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.md.tiankii.com/v1/invoice?AppId=app_4f21c9&LnurlpRequestId=lnurlp_18ab3c&PaymentRequestId=9c0a1b2d-3e4f-4a5b-8c9d-0e1f2a3b4c5d&Status=in%3Anew%2Ccomplete&end_at=2026-01-31T23%3A59%3A59Z&sort=-Created&start_at=2026-01-01T00%3A00%3A00Z")

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

request = Net::HTTP::Get.new(url)
request["x-application-account-id"] = 'acct_3f9a21c7'
request["x-api-key"] = '<apiKey>'

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.md.tiankii.com/v1/invoice?AppId=app_4f21c9&LnurlpRequestId=lnurlp_18ab3c&PaymentRequestId=9c0a1b2d-3e4f-4a5b-8c9d-0e1f2a3b4c5d&Status=in%3Anew%2Ccomplete&end_at=2026-01-31T23%3A59%3A59Z&sort=-Created&start_at=2026-01-01T00%3A00%3A00Z")
  .header("x-application-account-id", "acct_3f9a21c7")
  .header("x-api-key", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.md.tiankii.com/v1/invoice?AppId=app_4f21c9&LnurlpRequestId=lnurlp_18ab3c&PaymentRequestId=9c0a1b2d-3e4f-4a5b-8c9d-0e1f2a3b4c5d&Status=in%3Anew%2Ccomplete&end_at=2026-01-31T23%3A59%3A59Z&sort=-Created&start_at=2026-01-01T00%3A00%3A00Z', [
  'headers' => [
    'x-api-key' => '<apiKey>',
    'x-application-account-id' => 'acct_3f9a21c7',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.md.tiankii.com/v1/invoice?AppId=app_4f21c9&LnurlpRequestId=lnurlp_18ab3c&PaymentRequestId=9c0a1b2d-3e4f-4a5b-8c9d-0e1f2a3b4c5d&Status=in%3Anew%2Ccomplete&end_at=2026-01-31T23%3A59%3A59Z&sort=-Created&start_at=2026-01-01T00%3A00%3A00Z");
var request = new RestRequest(Method.GET);
request.AddHeader("x-application-account-id", "acct_3f9a21c7");
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-application-account-id": "acct_3f9a21c7",
  "x-api-key": "<apiKey>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.md.tiankii.com/v1/invoice?AppId=app_4f21c9&LnurlpRequestId=lnurlp_18ab3c&PaymentRequestId=9c0a1b2d-3e4f-4a5b-8c9d-0e1f2a3b4c5d&Status=in%3Anew%2Ccomplete&end_at=2026-01-31T23%3A59%3A59Z&sort=-Created&start_at=2026-01-01T00%3A00%3A00Z")! 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()
```