POST
/
v1
/
webhook-events
curl --request POST \
  --url https://api.sandbox.hit-pay.com/v1/webhook-events \
  --header 'Content-Type: application/json' \
  --header 'X-BUSINESS-API-KEY: <x-business-api-key>' \
  --data '{
  "name": "Test Webhook Event",
  "url": "<string>",
  "event_types": "charge.created"
}'
{
  "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"
}

Headers

X-BUSINESS-API-KEY
string
required

Body

application/json
name
string
required

The name of the webhook event.

url
string
required

The URL of the webhook, must be a valid URL with https protocol

event_types
string[]
required

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

Response

201 - application/json
id
string
required
business_id
string
required
name
string
required
url
string
required
event_types
string[]
required
created_at
string
required
updated_at
string
required