> For the complete documentation index, see [llms.txt](https://docs.barte.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.barte.com/guias/passo-a-passo-do-vendedor/3o-pos-pagamento/consultando-status-do-pedido.md).

# Consultando status do Pedido

Este endpoint permite consultar **o estado atual de um pedido**, incluindo:

* Status geral do pedido
* Cobranças associadas
* Dados do pagamento

📌 Esse endpoint é **consultivo** e deve ser usado para:

* Reconciliação
* Exibição de status ao cliente
* Auditoria
* Recuperação de estado em caso de falha

⚠️ **Não substitui o uso de webhooks** para confirmação de pagamento.

***

### Endpoint

**GET** `/v2/orders/{uuid}`\
`https://api.barte.com/v2/orders/{uuid}`

#### Headers

```
X-Token-Api: YOUR_API_KEY
Accept: */*
```

***

### Path Param

#### `uuid` (obrigatório)

Identificador único do pedido.

📌 Deve ser o `uuid` retornado no momento da criação do pedido.

***

### Exemplo de resposta

```json
{
  "uuid": "e82c66cc-cdf6-4253-87b2-ed339d3b9669",
  "status": "PAID",
  "title": "Teste",
  "description": "",
  "value": 100,
  "installments": 5,
  "startDate": "2025-10-14",
  "payment": "CREDIT_CARD_EARLY_SELLER",
  "customer": {
    "uuid": "",
    "document": "001052647",
    "type": "SSN",
    "documentCountry": "US",
    "name": "Joshua Henry",
    "email": "Heyj5wohn4445@gmail.com",
    "phone": "9409822523",
    "alternativeEmail": ""
  },
  "idempotencyKey": "b6cf42ba-3b64-4587-ba91-eec18465d091",
  "charges": [
    {
      "uuid": "f337e5a4-62a3-41af-8449-c9898f1de66b",
      "title": "Teste",
      "expirationDate": "2025-10-14",
      "paidDate": "2025-10-14",
      "value": 100,
      "paymentMethod": "CREDIT_CARD_EARLY_SELLER",
      "status": "PAID",
      "authorizationCode": "488713",
      "authorizationNsu": "154054",
      "retryable": false,
      "fee": 0.49
    }
  ]
}
```

***

### <i class="fa-bell">:bell:</i> Webhooks x Consulta

| Uso                      | Recomendação |
| ------------------------ | ------------ |
| Confirmar pagamento      | ✅ Webhook    |
| Exibir status ao cliente | ✅ GET Order  |
| Reconciliação            | ✅ GET Order  |
| Auditoria                | ✅ GET Order  |
| Ativar serviço           | ❌ GET Order  |

📌 **Webhook é a fonte oficial de verdade** para eventos financeiros.

***

### <i class="fa-rotate">:rotate:</i> Fluxo recomendado

```
Criar pedido
      ↓
Aguardar webhook
      ↓
Confirmar pagamento no webhook
      ↓
Persistir status final
      ↓
Usar GET /orders/{uuid} apenas para consulta
```

***

### <i class="fa-lightbulb">:lightbulb:</i> Boas práticas

* Sempre salve:
  * `uuid` do pedido
  * `value`
  * `status`
  * `charges[].uuid`
* Use esse endpoint para:
  * Recuperação de estado
  * Debug
  * Painéis administrativos
* Confirme pagamento **somente via webhook**
* Trate divergências entre webhook e GET como exceção crítica

***

### <i class="fa-hexagon-xmark">:hexagon-xmark:</i> O que não fazer

* Confirmar pagamento apenas com GET
* Ignorar o status das cobranças
* Confiar apenas no status do pedido sem validar charge
* Alterar estado interno baseado apenas em polling
* Expor a API Key no frontend


---

# 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 dynamically by asking a question.

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

```
GET https://docs.barte.com/guias/passo-a-passo-do-vendedor/3o-pos-pagamento/consultando-status-do-pedido.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
