webhooks

Register a new webhook endpoint to receive event notifications. (pay-authenticated access required)

Changed on

Register a new webhook endpoint

post/webhooks

Request

  • Base URL: ./../api/v1/ (relative, and the document was published on a file host, not at the API’s origin)
  • URL: ./../api/v1/webhooks
  • Auth: API key in header token

Request body

urlstring uri required

The webhook URL to receive notifications. Only public http and https destinations are allowed.

authTokenstring nullable

Authentication token for extended webhook requests. Required when format is EXTENDED

format'EXTENDED' | 'SLACK' | 'GOOGLE_CHAT' | 'DISCORD'

Webhook delivery format. Defaults to EXTENDED

Eventsstring[] required

Array of event types to subscribe to

namestring

Human-readable name for the webhook

paymentSourceIdstring nullable

Optional: link webhook to specific payment source

Example request

{
  "url": "https://your-server.com/webhook",
  "authToken": "your-webhook-secret-token",
  "Events": [
    "PURCHASE_ON_CHAIN_STATUS_CHANGED",
    "WALLET_LOW_BALANCE"
  ],
  "name": "My Payment Webhook",
  "paymentSourceId": "payment_source_id_optional"
}

Response

Webhook endpoint registered successfully

statusstring required

Example response

{
  "status": "Success",
  "data": {
    "id": "webhook_endpoint_id",
    "url": "https://your-server.com/webhook",
    "name": "My Payment Webhook",
    "Events": [
      "PURCHASE_ON_CHAIN_STATUS_CHANGED",
      "WALLET_LOW_BALANCE"
    ],
    "isActive": true,
    "createdAt": "1970-01-20T20:00:36.260Z",
    "paymentSourceId": null
  }
}

Changes

    • warning

      added the new HYDRA_HEAD_LOW_BALANCE enum value to the // response property for the response status

    • info

      added the new HYDRA_HEAD_LOW_BALANCE enum value to the request property /

    • breaking

      removed the enum value HYDRA_HEAD_LOW_BALANCE of the request property /

    • info

      removed the HYDRA_HEAD_LOW_BALANCE enum value from the // response property for the response status