WebhookSubscriptions
CreateWebhookSubscription
Creates a webhook subscription.
post/v2/webhooks/subscriptions
Request body
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"
}
}