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

# Receive your first sale

> Create a product, configure a webhook, and see the sale event arrive at your application.

**1. Have an active product**

See [Create a checkout](https://docs.doglytdc.dev/en/pay/get-started/create-checkout.md).

**2. Create the 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":"My store","url":"https://mystore.com/webhooks/doglytdc","events":["pix_generated","purchase_approved"]}'
```

Save the `secret` (`whsec_…`) from the response: it is only shown now.

**3. Make a test purchase**

Open the product link and pay the PIX.

**4. Receive the events**

First, `pix_generated` arrives; when the PIX is paid, `purchase_approved`.

**5. Check the order**

Use [Get Order](https://docs.doglytdc.dev/en/pay/api-reference/orders/retrieve.md) with the received ID.

![Screenshot: My sales in DoglyTdc Pay](https://mintcdn.com/dogly-tdc/qOnot79kPtISSKbW/images/pay/pay-sales.png?fit=max\&auto=format\&n=qOnot79kPtISSKbW\&q=85\&s=e0f73d5b7d46f74ed21bd815f4e96f79)

My sales in DoglyTdc Pay

> [!TIP]
>
> Validate the signature of each delivery before granting access. See [Validating the origin](https://docs.doglytdc.dev/en/pay/concepts/webhooks.md#validating-the-origin).


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