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

# Recibir tu primera venta

> Crea un producto, configura un webhook y mira el evento de venta llegar a tu aplicación.

**1. Ten un producto activo**

Consulta [Crear un checkout](https://docs.doglytdc.dev/es/pay/get-started/create-checkout.md).

**2. Crea el webhook**

```bash theme={null}
curl -X POST https://ucsyxzpdbnuyehizezvb.supabase.co/functions/v1/doglytdc-pay/v1/webhooks \
  -u "$DPAY_CLIENT_ID:$DPAY_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"name":"Mi tienda","url":"https://mitienda.com/webhooks/doglytdc","events":["pix_generated","purchase_approved"]}'
```

Guarda el `secret` (`whsec_…`) de la respuesta: solo aparece ahora.

**3. Haz una compra de prueba**

Abre el enlace del producto y paga el PIX.

**4. Recibe los eventos**

Primero llega `pix_generated`; cuando se paga el PIX, `purchase_approved`.

**5. Revisa el pedido**

Usa [Obtener Pedido](https://docs.doglytdc.dev/es/pay/api-reference/orders/retrieve.md) con el ID recibido.

![Captura de pantalla: Mis ventas en DoglyTdc Pay](https://mintcdn.com/dogly-tdc/qOnot79kPtISSKbW/images/pay/pay-sales.png?fit=max\&auto=format\&n=qOnot79kPtISSKbW\&q=85\&s=e0f73d5b7d46f74ed21bd815f4e96f79)

Mis ventas en DoglyTdc Pay

> [!TIP]
>
> Valida la firma de cada entrega antes de liberar el acceso. Consulta [Validando el origen](https://docs.doglytdc.dev/es/pay/concepts/webhooks.md#validando-el-origen).


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