> ## 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.

# Obtener Pedido

> Devuelve un pedido de tu cuenta por ID.

#### Alcance

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

## Qué hace

Devuelve un pedido de tu cuenta por ID.

## Casos de uso

* Validar una venta antes de liberar el acceso
* Atender al comprador en soporte

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

ID del pedido.

## Respuesta

**data** `object`

**campos**

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

Identificador único.

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

**amount\_cents** `integer`

Valor en centavos.

**currency** `string`

Moneda: `BRL` o `USD`.

**status** `string`

Estado actual.

**method** `string`

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

**customer\_email** `string`

**customer\_name** `string`

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

Cuándo fue creado.

## Errores

| Status | Descripción |
| - | - |
| `404` | Pedido no encontrado o de otra cuenta. |
| `401` | Clave inválida o revocada. |
| `403` | Faltan alcances (`insufficient_scope`). |
| `429` | Límite de solicitudes (`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@ejemplo.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.