> ## Documentation Index
> Fetch the complete documentation index at: https://docs.doglytdc.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Obter Pedido

> Retorna um pedido da sua conta pelo ID.

#### Escopo

```bash theme={null}
read orders
```

## O que faz

Retorna um pedido da sua conta pelo ID.

## Casos de uso

* Validar uma venda antes de liberar acesso
* Atender o comprador no suporte

**id** `string\<uuid\>` *required*

ID do pedido.

## Resposta

**data** `object`

**campos**

**id** `string\<uuid\>`

Identificador único.

**product\_id** `string\<uuid\>`

**amount\_cents** `integer`

Valor em centavos.

**currency** `string`

Moeda: `BRL` ou `USD`.

**status** `string`

Estado atual.

**method** `string`

`pix` ou `balance` (Saldo DoglyTdc).

**customer\_email** `string`

**customer\_name** `string`

**created\_at** `string\<date-time\>`

Quando foi criado.

## Erros

| Status | Descrição |
| - | - |
| `404` | Pedido não encontrado ou de outra conta. |
| `401` | Chave inválida ou revogada. |
| `403` | Faltam escopos (`insufficient_scope`). |
| `429` | Limite de requisições (`rate_limited`). |

```bash cURL theme={null}
curl --request GET \
  --url https://ucsyxzpdbnuyehizezvb.supabase.co/functions/v1/doglytdc-pay/v1/orders/5b1e9c3a-7d2f-4e8a-b6c4-0a1b2c3d4e5f \
  -u "$DPAY_CLIENT_ID:$DPAY_CLIENT_SECRET"
```

```json 200 theme={null}
{
  "data": {
    "id": "5b1e9c3a-7d2f-4e8a-b6c4-0a1b2c3d4e5f",
    "product_id": "8f0c2a8e-1b7d-4a55-9a3e-1c2d3e4f5a6b",
    "amount_cents": 1990,
    "currency": "BRL",
    "status": "paid",
    "method": "pix",
    "customer_email": "comprador@exemplo.com",
    "customer_name": "Ana Souza",
    "created_at": "2026-11-06T18:05:00Z"
  }
}
```

```json 401 theme={null}
{ "error": "unauthorized", "message": "Chave de API inválida." }
```

```json 403 theme={null}
{ "error": "insufficient_scope", "message": "Esta chave precisa dos escopos: read, orders." }
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.