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

# Create Webhook

> Create a new webhook endpoint to receive notifications for specific events.

Create a new webhook endpoint to receive notifications for specific events.

### Body Parameters

<ParamField body="url" type="string" required>
  The URL where notifications will be sent.
</ParamField>

<ParamField body="topics" type="array">
  List of event types to subscribe to (e.g., `["order.paid", "order.failed"]`).
</ParamField>

<ParamField body="active" type="boolean">
  (Optional) Set to `true` to enable the webhook immediately (Default: `true`).
</ParamField>

### Sample Request

```bash theme={null}
curl --location 'https://api.paytring.com/api/v2/webhook/create' \
--user '<API_KEY>:<API_SECRET>' \
--header 'Content-Type: application/json' \
--data '{
    "url": "https://your-domain.com/webhook",
    "topics": ["order.paid"],
    "active": true
}'
```


## OpenAPI

````yaml POST /api/v2/webhook/create
openapi: 3.1.0
info:
  title: Orchestration
  version: '1'
servers:
  - url: https://api.paytring.com
security:
  - sec0: []
paths:
  /api/v2/webhook/create:
    post:
      tags:
        - Webhook V2
      summary: Create Webhook
      description: >-
        Create a new webhook endpoint to receive notifications for specific
        events.
      operationId: create-webhook
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - url
              properties:
                url:
                  type: string
                  description: The URL where notifications will be sent.
                topics:
                  type: array
                  items:
                    type: string
                  description: List of event types to subscribe to.
                active:
                  type: boolean
                  description: Set to true to enable the webhook immediately.
                  default: true
      responses:
        '200':
          description: Webhook created successfully
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic

````