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

# Set up order webhooks

> Lastly, we're going to subscribe to two of the order-related webhooks.

# Step 3: set up order webhooks

Lastly, we're going to subscribe to two of the order-related webhooks.

The first event type to subscribe to is `OrderCreated`. This event is triggered when an order is created, in both sandbox and production.

<CodeGroup>
  ```bash Sandbox theme={null}
  curl -i -X POST 'https://api-sandbox.equalsmoney.com/v2/webhooks' \
  -H 'Authorization: ApiKey {apiKey}' \ # Your API key
  -H 'Content-Type: application/json' \
  -d '{
    "webhookEventTypeName": "OrderCreated",
    "accountId": "{accountId}",
    "url": "{webhookUrl}",
    "enabled": true
  }'
  ```

  ```bash Production theme={null}
  curl -i -X POST 'https://api.equalsmoney.com/v2/webhooks' \
  -H 'Authorization: ApiKey {apiKey}' \ # Your API key
  -H 'Content-Type: application/json' \
  -d '{
    "webhookEventTypeName": "OrderCreated",
    "accountId": "{accountId}",
    "url": "{webhookUrl}",
    "enabled": true
  }'
  ```
</CodeGroup>

The second event type to subscribe to is `OrderCompleted`. This event is triggered when an order is completed in production. You won't receive it in sandbox.

<CodeGroup>
  ```bash Sandbox theme={null}
  curl -i -X POST 'https://api-sandbox.equalsmoney.com/v2/webhooks' \
  -H 'Authorization: ApiKey {apiKey}' \ # Your API key
  -H 'Content-Type: application/json' \
  -d '{
    "webhookEventTypeName": "OrderCompleted",
    "accountId": "{accountId}",
    "url": "{webhookUrl}",
    "enabled": true
  }'
  ```

  ```bash Production theme={null}
  curl -i -X POST 'https://api.equalsmoney.com/v2/webhooks' \
  -H 'Authorization: ApiKey {apiKey}' \ # Your API key
  -H 'Content-Type: application/json' \
  -d '{
    "webhookEventTypeName": "OrderCompleted",
    "accountId": "{accountId}",
    "url": "{webhookUrl}",
    "enabled": true
  }'
  ```
</CodeGroup>

<Info>
  For more information about webhooks and webhook event type structures, [see the webhooks guide](/pages/webhooks/how-it-works).
</Info>
