> 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/webhooks/pedidos-orders-e-assinaturas-subscriptions.md).

# Pedidos (Orders) e Assinaturas (Subscriptions)

{% hint style="danger" %}
**Webhook de `ORDER` — formato v1 em descontinuação.**\
A partir de **10/08/2026**, o formato v1 será descontinuado. Todos os sellers deverão estar integrados ao [Webhook v2](/guias/webhooks/webhooks-overview/webhook-v2-visao-geral.md). Sellers que ainda não possuem integração ativa devem integrar diretamente pelo novo modelo.

**Webhook de `SUBSCRIPTION`** — o formato atual permanece inalterado e não será migrado para v2 neste momento.
{% endhint %}

***

Os webhooks de **Orders** (pedidos) e **Subscriptions** (assinaturas) compartilham **o mesmo formato de payload**.\
A única diferença entre eles está no valor do campo `domain` e nos **status possíveis** para cada tipo.

###

### <i class="fa-arrow-right-arrow-left">:arrow-right-arrow-left:</i> Diferenças principais

| Campo                | ORDER                                                                                                       | SUBSCRIPTION                                 |
| -------------------- | ----------------------------------------------------------------------------------------------------------- | -------------------------------------------- |
| **domain**           | `ORDER`                                                                                                     | `SUBSCRIPTION`                               |
| **tipo de operação** | Pedido único                                                                                                | Cobrança recorrente                          |
| **status possíveis** | `SENT`, `ABANDONED`, `PAID`, `CANCELED`, `LATE`, `PARTIALLY_PAID`, `REFUND`, `CHARGEBACK`, `PRE_AUTHORIZED` | `PENDING`, `ACTIVE`, `DEFAULTER`, `INACTIVE` |
| **payload**          | Mesmo formato JSON                                                                                          | Mesmo formato JSON                           |

***

### <i class="fa-right">:right:</i> Status válidos

#### **Pedidos (`ORDER`)**

* SENT
* PRE\_AUTHORIZED
* PARTIALLY\_PAID
* PAID
* CANCELED
* REFUND
* LATE
* CHARGEBACK
* ABANDONED

> 🔸 Pedidos com status `LATE` há mais de **90 dias** são automaticamente marcados como `ABANDONED`.

#### **Assinaturas (`SUBSCRIPTION`)**

* PENDING
* ACTIVE
* DEFAULTER
* INACTIVE

***

### <i class="fa-gear-code">:gear-code:</i> Estrutura do Payload (único)

A estrutura abaixo é **idêntica** para ambos os domínios (`ORDER` e `SUBSCRIPTION`).

```json
{
  "uuid": "5503ad3a-d9c4-4072-a7cb-12cf2dd0eaa7",
  "dateTime": "2025-10-21T14:04:05.930643751",
  "status": "SENT",
  "domain": "ORDER",
  "uuidBuyer": "33236116-743a-4c1c-afc4-79b8d5dbb5b5",
  "documentBuyer": "518287216",
  "address": {
    "country": "AU",
    "state": "TAS",
    "city": "",
    "district": "",
    "street": "balers way sunset beach",
    "zipCode": "7330",
    "number": "17",
    "complement": ""
  },
  "emailBuyer": "cliente@example.com",
  "metadata": null,
  "cnpjSeller": "56210126000145",
  "idSeller": 4922,
  "authorizationCode": "496847",
  "authorizationNsu": "155224",
  "cards": [],
  "refunds": []
}
```

### <i class="fa-memo">:memo:</i> Exemplo de Refunds

Quando houver estorno, o campo `refunds` será preenchido conforme o exemplo abaixo:

```json
"refunds": [
  {
    "date": "2025-04-04",
    "amount": 121.12,
    "status": "SUCCESS"
  }
]
```

<i class="fa-tickets">:tickets:</i> Em caso de dúvidas, entre em contato com o nosso time através do suporte disponibilizado.


---

# 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/webhooks/pedidos-orders-e-assinaturas-subscriptions.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.
