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

# Create Webhook Event

> Register a webhook endpoint to receive payment and order event notifications



## OpenAPI

````yaml post /v1/webhook-events
openapi: 3.1.1
info:
  title: HitPay API
  description: >-
    Accept PayNow, FPX, QRIS, GrabPay, cards, and 40+ payment methods with a
    single API. Production base URL: https://api.hit-pay.com, Sandbox:
    https://api.sandbox.hit-pay.com
  version: '1.0'
servers:
  - url: https://api.hit-pay.com
    description: Production
  - url: https://api.sandbox.hit-pay.com
    description: Sandbox
security: []
paths:
  /v1/webhook-events:
    post:
      summary: Create a Webhook Event
      description: >-
        This endpoint allows you to create a webhook event. The webhook event
        will listen to the event types that you specify and send a POST request
        to the URL that you specify.
      operationId: create-webhook-event
      parameters:
        - name: X-BUSINESS-API-KEY
          in: header
          required: true
          style: simple
          explode: false
          schema:
            type: string
            example: b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - url
                - event_types
              properties:
                name:
                  type: string
                  maxLength: 255
                  examples:
                    - Test Webhook Event
                  description: The name of the webhook event.
                url:
                  type: string
                  format: uri
                  description: >-
                    The URL of the webhook, must be a valid URL with `https`
                    protocol
                event_types:
                  type: array
                  items:
                    type: string
                    enum:
                      - charge.created
                      - charge.updated
                      - payout.created
                      - order.created
                      - order.updated
                      - invoice.created
                      - invoice.updated
                      - transfer.created
                      - transfer.updated
                  description: >-
                    The event types that the webhook will listen to. The
                    available events: charge.created, charge.updated,
                    payout.created, order.created, order.updated,
                    invoice.created, transfer.created, transfer.updated
                  examples:
                    - charge.created
                    - charge.updated
                    - payout.created
                    - order.created
                    - order.updated
                    - invoice.created
                    - invoice.updated
                    - transfer.created
                    - transfer.updated
                    - transfer.scheduled
                    - transfer.processing
                    - transfer.paid
                    - transfer.failed
                    - transfer.canceled
      responses:
        '201':
          description: '201'
          content:
            application/json:
              examples:
                Result:
                  value:
                    id: 9b2ada28-be3c-47ab-883f-ba72e5d8305d
                    business_id: 9b294222-3a53-427f-9393-95dc6d63ee6c
                    name: Test Webhook Event
                    url: https://google.com
                    event_types:
                      - transfer.created
                      - transfer.updated
                    created_at: '2024-01-24T16:05:10+08:00'
                    updated_at: '2024-01-24T16:05:10+08:00'
              schema:
                type: object
                properties:
                  id:
                    type: string
                  business_id:
                    type: string
                  name:
                    type: string
                  url:
                    type: string
                  event_types:
                    type: array
                    items:
                      type: string
                  created_at:
                    type: string
                  updated_at:
                    type: string
                required:
                  - id
                  - business_id
                  - name
                  - url
                  - event_types
                  - created_at
                  - updated_at
      deprecated: false

````