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

# Create Webhook

> Register a webhook endpoint to receive real-time notifications about payment events like success or failure

Webhooks which we send currently include only one event `payment_intent.status.updated`


## OpenAPI

````yaml ../payment-service-openapi.json POST /webhook
openapi: 3.0.0
info:
  title: Ziina API
  description: ''
  version: 1.0.0
  contact: {}
servers:
  - url: https://api-v2.ziina.com/api
security:
  - bearer: []
tags: []
paths:
  /webhook:
    post:
      tags:
        - Webhook
      operationId: WebhookController_createWebhook
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetWebhookRequestDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponseDto'
components:
  schemas:
    SetWebhookRequestDto:
      type: object
      properties:
        url:
          type: string
          description: Url where webhooks will be sent
        secret:
          type: string
          description: >-
            Optional. Provide your client secret if you want to verify the
            authenticity of the request using HMAC. This ensures the request
            hasn't been tampered with. You can generate your own secret and use
            it consistently for signing and verifying requests.
      required:
        - url
    WebhookResponseDto:
      type: object
      properties:
        success:
          type: boolean
          description: true if request was successful, false otherwise
        error:
          type: string
          description: Optional error message
      required:
        - success
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````