Webhooks

Create a webhook that receives notifications for the subscribed events.

Each delivery is a POST to the webhook URL, signed with secret_key in the X-Webhook-Signature header.

post/api/v2/webhooks

Request

  • Base URL
    https://stream-app-service.streampay.sa
  • Auth
    • HTTP bearer
    • or API key in header x-api-key

Request body

urlstring uri required

HTTPS URL that receives event notifications. It must use port 443 and resolve to a public address.

enabledboolean required

Whether events are delivered to this webhook.

secret_keystring required

Secret used to sign each delivery. Every request carries an X-Webhook-Signature: t=<timestamp>,v1=<signature> header, where <signature> is the hex HMAC-SHA256 of <timestamp>.<raw request body> keyed with this secret.

namestring nullable

Label to tell webhooks apart.

subscriptionsWebhookEventType[] required

Events this webhook receives. GET /v2/webhooks/events lists the available events.

Response

Successful Response

idstring uuid

Unique identifier (UUID) of the webhook.

urlstring uri

HTTPS URL that receives event notifications.

namestring nullable

Label to tell webhooks apart.

enabledboolean

Whether events are delivered to this webhook.

health_status'ENABLED' | 'WARNING' | 'DISABLED' | 'BLOCKED'

Computed health status for merchant webhook list UI.

created_bystring uuid

ID of the user who created the webhook.

Changes