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

# Lista de faturas

O método permite recuperar uma lista de todas as faturas enviando uma solicitação POST.

Para obter uma lista de todas as faturas, envie uma solicitação POST para a seguinte URL:

### O que o método permite fazer

* Retorna uma lista de todas as faturas
* Número máximo de registos por solicitação — 100
* Por padrão, a resposta contém 10 registos

### Ponto de extremidade

<mark style="color:verde;">`POST`</mark> `https://api.trybit.com/v2/invoice/merchant/list`

### Cabeçalhos

| Nome                                               | Tipo   | Exemplo                             | Descrição               |
| -------------------------------------------------- | ------ | ----------------------------------- | ----------------------- |
| Autorização<mark style="color:vermelho;">\*</mark> | string | Token eyJ0eXAiOiJK<...>4npi1ksS8tSY | Chave da API do projeto |

### Corpo da solicitação

Parâmetros principais

| Nome                                         | Tipo   | Exemplo    | Descrição                                                                                                                                                                                                              |
| -------------------------------------------- | ------ | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| start<mark style="color:vermelho;">\*</mark> | string | 01.01.2026 | Data no formato «dd.mm.yyyyy»                                                                                                                                                                                          |
| end<mark style="color:vermelho;">\*</mark>   | string | 31.01.2026 | Data no formato «dd.mm.yyyyy». Deve ser posterior ou igual a start.                                                                                                                                                    |
| offset                                       | int    | 0          | <p>Este é o índice do registo inicial a partir do qual a obtenção dos dados começa.</p><p></p><p>Por exemplo, se <code>offset=10</code>, os dados começarão a partir do 11.º registo.</p>                              |
| limit                                        | int    | 10         | <p>Este é o número do último registo que você deseja obter.</p><p></p><p>Por exemplo, se <code>limit=20</code>, você receberá registos até e incluindo o 20.º, começando pelo especificado em <code>offset</code>.</p> |

### Exemplos de solicitação

Estes exemplos mostram como enviar uma solicitação para recuperar uma lista de faturas dentro dos limites especificados.

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST https://api.trybit.com/v2/invoice/merchant/list \\
     -H \"Authorization: Token <API KEY>\" \\
     -H \"Content-Type: application/json\" \\
     -d '{"start":"01.01.2023","end":"31.01.2023","offset":0,"limit":10}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.trybit.com/v2/invoice/merchant/list"
headers = {
    "Authorization": "Token <API KEY>"
}
data = {
    "start": "01.01.2023",
    "end": "31.01.2023",
    "offset": 0,
    "limit": 10
}

response = requests.post(url, headers=headers, json=data)

if response.status_code == 200:
    print("Sucesso:", response.json())
else:
    print("Falha:", response.status_code, response.text)
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch('https://api.trybit.com/v2/invoice/merchant/list', {
    method: 'POST',
    headers: {
        'Authorization': 'Token <API KEY>',
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
        start: '01.01.2023',
        end: '31.01.2023',
        offset: 0,
        limit: 10
    })
})
.then(response => {
    if (response.ok) {
        return response.json();
    } else {
        throw new Error('Falha: ' + response.status + ' ' + response.statusText);
    }
})
.then(data => console.log('Sucesso:', data))
.catch(error => console.error('Erro:', error));
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://api.trybit.com/v2/invoice/merchant/list");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array(
    "start" => "01.01.2023",
    "end" => "31.01.2023",
    "offset" => 0,
    "limit" => 10
)));

$headers = array(
    "Authorization: Token <API KEY>",
    "Content-Type: application/json"
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Erro:' . curl_error($ch);
} else {
    $statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    if ($statusCode == 200) {
        echo "Sucesso: " . $response;
    } else {
        echo "Falha: " . $statusCode . " " . $response;
    }
}

curl_close($ch);
?>
```

{% endtab %}
{% endtabs %}

### Exemplos de resposta

Uma solicitação bem-sucedida retorna uma resposta com o status `sucesso` e um `resultado` objeto.

{% tabs %}
{% tab title="200: OK – Lista recebida" %}

```json
{
    "status": "sucesso",
    "result": [
       {
           "uuid": "INV-89UX09KA",
           "created": "2026-01-01 09:03:58.958133",
           "address": "0xb07427fc721C23674c48233ffE93D3846ee58B63",
           "currency": {
               "id": 3,
               "code": "ETH",
               "fullcode": "ETH",
               "network": {
                   "code": "ERC20",
                   "id": 3,
                   "icon": "https://cdn.trybit.com/img/network/ERC.svg",
                   "fullname": "Ethereum"
               },
               "name": "Ethereum",
               "is_email_required": false,
               "stablecoin": false,
               "icon_base": "https://cdn.trybit.com/img/currency/ETH.svg",
               "icon_network": "https://cdn.trybit.com/img/currency/ETH.svg",
               "icon_qr": "https://cdn.trybit.com/img/stroke/ETH_STROKE.svg",
               "order": 9
           },
           "date_finished": "2026-01-01 19:27:37.258735",
           "expiry_date": "2026-01-02 09:03:57.493361",
           "side_commission": "cliente",
           "side_commission_cc": "comerciante",
           "type_payments": "cripto",
           "status": "pago",
           "invoice_status": "sucesso",
           "is_email_required": false,
           "project": {
               "id": 1,
               "name": "Teste",
               "fail": "Nenhum",
               "success": "Nenhum",
               "logo": null
           },
           "tx_list": [
               "0x4d52dc2d2fa8555ab10211bd6c9a7aed13e6f9e1901090b03e7bf74603178c15",
                          ],
           "test_mode": false,
           "type": "up",
           "user_email": "a**********b@gmail.com",
           "pay_url": "Nenhum",
           "phone": "",
           "order_id": "Nenhum",
           "amount_in_crypto": null,
           "amount_in_fiat": 1.0,
           "amount": 0.000693,
           "amount_usd": 1.0,
           "amount_to_pay": 0.000694,
           "amount_to_pay_usd": 2.03,
           "amount_paid": 0.000694,
           "amount_paid_usd": 2.03,
           "fee": 1e-06,
           "fee_usd": 0.0,
           "service_fee": 1.2e-05,
           "service_fee_usd": 0.04,
           "received": 0.000681,
           "received_usd": 1.99,
           "to_surcharge": 0.0,
           "to_surcharge_usd": 0.0
       }

    ],
    "all_count": 2
}
```

{% endtab %}
{% endtabs %}

### Parâmetros da resposta

Uma solicitação bem-sucedida retorna uma resposta com o status `sucesso` e um `resultado` objeto.

O `resultado` objeto contém:

<table><thead><tr><th>Nome</th><th>Tipo</th><th width="200">Exemplo</th><th>Descrição</th></tr></thead><tbody><tr><td>uuid</td><td>string</td><td>INV-89UX09KA</td><td>Identificador único da fatura com o prefixo INV</td></tr><tr><td>created</td><td>string</td><td>2026-01-01 12:00:00.000000</td><td>Hora de criação da fatura no formato UTC+0: YYYY-MM-DD HH:MI:SS.FFFFFF</td></tr><tr><td>address</td><td>string</td><td>0xb07427&#x3C;...>E93D3846ee58B63</td><td>Endereço de pagamento</td></tr><tr><td>expiry_date</td><td>string</td><td>2026-01-02 12:00:00.000000</td><td><p>Data de expiração da fatura no formato UTC+0: YYYY-MM-DD HH:MI:SS.FFFFFF.</p><p></p><p>Após o tempo de expiração, o status da fatura mudará para <code>cancelado</code> se o pagamento não tiver sido recebido.</p></td></tr><tr><td>side_commission</td><td>string</td><td>cliente</td><td>Pagador da taxa de transferência</td></tr><tr><td>side_commission_cc</td><td>string</td><td>cliente</td><td>Pagador da taxa de serviço</td></tr><tr><td>amount</td><td>float</td><td>0.033366</td><td>Valor da fatura na criptomoeda selecionada</td></tr><tr><td>amount_usd</td><td>float</td><td>100.0</td><td>Valor da fatura em USD</td></tr><tr><td>amount_in_fiat</td><td>float</td><td>100.0</td><td>Valor da fatura na moeda de criação (depende do <code>currency</code> parâmetro)</td></tr><tr><td>fee</td><td>float</td><td>4.500000159168849e-06</td><td>Taxa de transferência</td></tr><tr><td>fee_usd</td><td>float</td><td>0.01</td><td>Taxa de transferência em USD</td></tr><tr><td>service_fee</td><td>float</td><td>0.000634</td><td>Taxa de serviço</td></tr><tr><td>service_fee_usd</td><td>float</td><td>1.9</td><td>Taxa de serviço em USD</td></tr><tr><td>fiat_currency</td><td>string</td><td>USD</td><td>Código da moeda fiduciária na qual a fatura foi criada</td></tr><tr><td>status</td><td>string</td><td>created</td><td><p>Status da fatura</p><p></p><p>Quando uma solicitação de criação de fatura é enviada, o status é sempre <code>created</code>.</p><p></p><p>Outros status possíveis: <code>pago</code> (pago), <code>parcial</code> (parcialmente pago), <code>pago a mais</code> (pago a mais), e <code>cancelado</code> (cancelado).</p></td></tr><tr><td>is_email_required</td><td>bool</td><td>false</td><td>Parâmetro que exige o e-mail do pagador na fatura</td></tr><tr><td>link</td><td>string</td><td>pay.trybit.com/89UX09KA</td><td>Link para a página da fatura</td></tr><tr><td>currency</td><td>dict</td><td><p>"currency": {</p><p>            "id": 3,</p><p>            "code": "ETH",</p><p>            "fullcode": "ETH",</p><p>            "network": {</p><p>                "code": "ERC20",</p><p>                "id": 3,</p><p>                "icon": "https://cdn.trybit.com/img/network/ERC.svg",</p><p>                "fullname": "Ethereum"</p><p>            },</p><p>            "name": "Ethereum",</p><p>            "is_email_required": false,</p><p>            "stablecoin": false,</p><p>            "icon_base": "https://cdn.trybit.com/img/currency/ETH.svg",</p><p>            "icon_network": "https://cdn.trybit.com/img/currency/ETH.svg",</p><p>            "icon_qr": "https://cdn.trybit.com/img/stroke/ETH_STROKE.svg",</p><p>            "order": 9</p><p>        }</p></td><td><p>Objeto da criptomoeda selecionada na fatura.</p><p></p><p>Também contém o <code>rede</code> objeto — informações sobre a rede da moeda selecionada.</p></td></tr><tr><td>project</td><td>dict</td><td><p>"project": {</p><p>            "id": 0,</p><p>            "name": "MyShop",</p><p>            "fail": "https://test.com/failed-payment",</p><p>            "success": "https://test.com/successful-payment",</p><p>            "logo": "https://static.trybit.com/logo/logo.jpg"</p><p>        }</p></td><td>Objeto contendo informações do projeto</td></tr><tr><td>test_mode</td><td>bool</td><td>false</td><td>Indicador da fatura de teste</td></tr><tr><td>received</td><td>float</td><td>0.00206</td><td>Montante creditado no saldo em criptomoeda</td></tr><tr><td>received_usd</td><td>float</td><td>0.26</td><td>Montante creditado no saldo em USD</td></tr><tr><td>to_surcharge</td><td>float</td><td>0.001172</td><td>Montante restante a pagar em criptomoeda</td></tr><tr><td>to_surcharge_usd</td><td>float</td><td>0.08</td><td>Montante restante a pagar em USD</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.trybit.com/pt/referencia-da-api-v2/invoice-list.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
