> For the complete documentation index, see [llms.txt](https://docs.bitsby.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bitsby.app/api-documentation/invoice-list.md).

# Invoice list

## Request

```bash
curl -X POST https://api.bitsby.app/invoices/list \
  -H "Authorization: Token MSvL2ltaDZdWVjmZURURMVWhqSJLT2NURjhL2Fla1Z1T1IxQTltKs1T3Ay" \
	-F "startDate=2000-01-01" \
	-F "endDate=2030-01-01" \
	-F "offset=0" \
	-F "limit=10"
```

## Request parameters

<table data-full-width="true"><thead><tr><th>Parameter</th><th>Data type</th><th>Description</th><th>Example</th><th>Mandatory?</th><th>Default</th></tr></thead><tbody><tr><td><code>invoiceId</code></td><td>UUID</td><td>Invoice ID in UUID format</td><td>1c48b092-9878-48f5-b441-07a8a48e7b54</td><td>no</td><td></td></tr><tr><td><code>invoiceUid</code></td><td>String</td><td>Invoice ID (for buyer)</td><td>F7ncQviM1N92</td><td>no</td><td></td></tr><tr><td><code>projectId</code></td><td>UUID</td><td>Project ID in UUID format</td><td>1c48b092-9878-48f5-b441-07a8a48e7b54</td><td>no</td><td></td></tr><tr><td><code>startDate</code></td><td>String</td><td>Initial date of invoice creation in the format Y-m-d</td><td>2000-01-01</td><td>no</td><td></td></tr><tr><td><code>endDate</code></td><td>String</td><td>End date of invoice creation in the format Y-m-d</td><td>2030-01-01</td><td>no</td><td></td></tr><tr><td><code>status</code></td><td>String</td><td>Invoice status. Valid values: unpaid, canceled, paid, expired</td><td>paid</td><td>no</td><td></td></tr><tr><td><code>offset</code></td><td>Integer</td><td>Number of the initial record from which the data output will begin</td><td>0</td><td>no</td><td>0</td></tr><tr><td><code>limit</code></td><td>Integer</td><td>The number of records you want to retrieve</td><td>50</td><td>no</td><td>10</td></tr></tbody></table>

## Example answer

```json
{
    "result": "success",
    "data": [
        {
            "id": "59302b02-d1be-4e10-960f-d6ec24bfcaaf",
            "uid": "F7nYgvxM1N92",
            "projectId": "9deea1e2-0c08-41a3-bdc2-a34eada3892d",
            "createDatetime": "2024-02-29 10:49:56",
            "timeToPayDatetime": "2024-03-01 10:49:56",
            "commissionFiatUSD": "1.00",
            "amountFiatUSD": "100.00",
            "amountFiat": "100.00",
            "currencyFiat": "USD",
            "description": null,
            "serviceData": null,
            "views": 0,
            "status": "canceled"
        },
        {
            "id": "f31c61f6-407f-4999-95cf-56477eff06d4",
            "uid": "riUZBnNvd2rX",
            "projectId": "9deea1e2-0c08-41a3-bdc2-a34eada3892d",
            "createDatetime": "2024-02-27 20:57:23",
            "timeToPayDatetime": "2024-02-28 08:57:23",
            "commissionFiatUSD": "0.12",
            "amountFiatUSD": "12.00",
            "amountFiat": "12.00",
            "currencyFiat": "USD",
            "description": null,
            "serviceData": "userId:2444",
            "views": 0,
            "status": "paid",
            "payment": {
                "id": "f986ad8d-2298-473d-982a-efbc817b975d",
                "amount": "12.00000000",
                "hash": "f09352627039c088688806821b864895ff237558612d834861621fc026de5f68",
                "transactionDatetime": "2024-02-27 21:05:36"
            },
            "wallet": {
                "id": "47aa71e2-07a0-482e-9172-7114d7376ba0",
                "name": "usdt-tron",
                "blockchain": "tron",
                "cryptocurrency": "usdt",
                "address": "TKbstUwMzLrfTAGL4erYb7gc7ghmHQ9zG7"
            }
        }
    ]
}
```

## Answer parameters

| Parameter                     | Description                                                                                                                                             |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                          | Invoice ID in UUID format                                                                                                                               |
| `uid`                         | Invoice ID (for buyer)                                                                                                                                  |
| `projectId`                   | Project ID in UUID format                                                                                                                               |
| `createDatetime`              | Date and time of invoice creation (UTC)                                                                                                                 |
| `timeToPayDatetime`           | Date and time until which the invoice is valid (UTC). The buyer must have time to pay the invoice before this date                                      |
| `commissionFiatUSD`           | The amount of the service commission. Calculated relative to the amount `invoice.amountFiatUSD`                                                         |
| `amountFiatUSD`               | Amount in USD currency calculated during invoice creation at the current exchange rate relative to the `invoice.amountFiat` amount                      |
| `amountFiat`                  | Amount in fiat currency                                                                                                                                 |
| `currencyFiat`                | Fiat currency                                                                                                                                           |
| `description`                 | The description that was set when the invoice was created. Displayed to the buyer                                                                       |
| `serviceData`                 | Service data that was set via API when creating the invoice. Not displayed to the buyer. Used to identify the invoice and payment in the merchant store |
| `views`                       | Number of views of the payment form                                                                                                                     |
| `status`                      | Invoice status                                                                                                                                          |
| `payment`                     | Section containing payment parameters. It is displayed if the invoice has been paid                                                                     |
| `payment.id`                  | Payment ID in UUID format                                                                                                                               |
| `payment.amount`              | Payment amount in cryptocurrency                                                                                                                        |
| `payment.hash`                | Transaction hash in blockchain                                                                                                                          |
| `payment.transactionDatetime` | Date and time of the transaction in blockchain (UTC)                                                                                                    |
| `wallet`                      | Section containing the parameters of the wallet to which the payment came. Displayed if the invoice has been paid                                       |
| `wallet.id`                   | Wallet ID in UUID format                                                                                                                                |
| `wallet.name`                 | Wallet name                                                                                                                                             |
| `wallet.blockchain`           | Blockchain of the crypto wallet                                                                                                                         |
| `wallet.cryptocurrency`       | Cryptocurrency of the wallet                                                                                                                            |
| `wallet.address`              | Crypto wallet address                                                                                                                                   |
