# Verificação do status da fatura

Para obter informações sobre todos os pagamentos numa conta, envie um pedido GET para o seguinte URL:

<mark style="color:azul;">`GET`</mark> `https://api.cryptocloud.plus/v1/invoice/info`

#### Corpo da solicitação

| Nome                                        | Tipo   | Descrição                     |
| ------------------------------------------- | ------ | ----------------------------- |
| uuid<mark style="color:vermelho;">\*</mark> | string | Identificador único da fatura |

{% tabs %}
{% tab title="200: Estado OK recebido" %}

```json
{
  "estado": "sucesso",
  "status_invoice": "pago"
}
```

{% endtab %}

{% tab title="400: Pedido inválido Erro na verificação do estado" %}

{% endtab %}

{% tab title="401: Não autorizado Chave API incorreta" %}

{% endtab %}
{% endtabs %}

### Exemplos de solicitação

Estes exemplos mostram como pode executar um pedido para verificar o estado de uma fatura usando Python e JavaScript. Note que precisa de fornecer a sua chave de API no `Autorização` cabeçalho para autorizar o pedido com sucesso.

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

```python
import requests

url = "https://api.cryptocloud.plus/v1/invoice/info"
headers = {
    "Authorization": "Token <API KEY>"
}

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

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

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const url = 'https://api.cryptocloud.plus/v1/invoice/info';
const headers = new Headers({
    'Authorization': 'Token <API KEY>'
});

fetch(url, { method: 'GET', headers })
    .then(response => {
        if (response.ok) {
            return response.json();
        } else {
            return Promise.reject('Error');
        }
    })
    .then(data => {
        console.log('Sucesso:', data);
    })
    .catch(error => {
        console.error('Falha:', error);
    });
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cryptocloud.plus/pt/referencia-da-api-v1-antiga/check-invoice-status.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
