v1

latestOpenAPI 3.0.0Apache 2.02026-07-143281,4552.1 MB
WebhookSubscriptions

CreateWebhookSubscription

Creates a webhook subscription.

post/v2/webhooks/subscriptions

Request body

idempotency_keystring

A unique string that identifies the CreateWebhookSubscription request.

Example request

{
  "idempotency_key": "63f84c6c-2200-4c99-846c-2670a1311fbf",
  "subscription": {
    "api_version": "2021-12-15",
    "event_types": [
      "payment.created",
      "payment.updated"
    ],
    "name": "Example Webhook Subscription",
    "notification_url": "https://example-webhook-url.com"
  }
}

Response

Success

Example response

{
  "subscription": {
    "api_version": "2021-12-15",
    "created_at": "2022-01-10 23:29:48 +0000 UTC",
    "enabled": true,
    "event_types": [
      "payment.created",
      "payment.updated"
    ],
    "id": "wbhk_b35f6b3145074cf9ad513610786c19d5",
    "name": "Example Webhook Subscription",
    "notification_url": "https://example-webhook-url.com",
    "signature_key": "1k9bIJKCeTmSQwyagtNRLg",
    "updated_at": "2022-01-10 23:29:48 +0000 UTC"
  }
}