Creates a new webhook
Required permissions:
developer:manage_webhookA company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************
Parameters for CreateWebhook
The URL to send the webhook to.
"https://example.com/path"
The API version for this webhook
v1, v2, v5 Whether or not to send events for child resources. For example, if the webhook is created for a Company, enabling this will only send events from the Company's sub-merchants (child companies).
Whether or not the webhook is enabled.
The events to send the webhook for.
The different event types available
invoice.created, invoice.paid, invoice.past_due, invoice.voided, membership.activated, membership.deactivated, entry.created, entry.approved, entry.denied, entry.deleted, setup_intent.requires_action, setup_intent.succeeded, setup_intent.canceled, withdrawal.created, withdrawal.updated, course_lesson_interaction.completed, payout_method.created, verification.succeeded, payment.created, payment.succeeded, payment.failed, payment.pending, dispute.created, dispute.updated, refund.created, refund.updated, dispute_alert.created, membership.cancel_at_period_end_changed The resource to create the webhook for. By default this will use current company
A successful response
A webhook endpoint that receives event notifications for a company via HTTP POST.
The unique identifier for the webhook.
"hook_xxxxxxxxxxxxx"
The destination URL where webhook payloads are delivered via HTTP POST.
"https://example.com/path"
Whether this webhook endpoint is currently active and receiving events.
The list of event types this webhook is subscribed to.
The different event types available
invoice.created, invoice.paid, invoice.past_due, invoice.voided, membership.activated, membership.deactivated, entry.created, entry.approved, entry.denied, entry.deleted, setup_intent.requires_action, setup_intent.succeeded, setup_intent.canceled, withdrawal.created, withdrawal.updated, course_lesson_interaction.completed, payout_method.created, verification.succeeded, payment.created, payment.succeeded, payment.failed, payment.pending, dispute.created, dispute.updated, refund.created, refund.updated, dispute_alert.created, membership.cancel_at_period_end_changed The API version used to format payloads sent to this webhook endpoint.
v1, v2, v5 The datetime the webhook was created.
"2023-12-01T05:00:00.401Z"
Whether events are sent for child resources. For example, if the webhook is on a company, enabling this sends events only from the company's sub-merchants (child companies).
The subset of subscribed event types that support sending test payloads.
The different event types available
invoice.created, invoice.paid, invoice.past_due, invoice.voided, membership.activated, membership.deactivated, entry.created, entry.approved, entry.denied, entry.deleted, setup_intent.requires_action, setup_intent.succeeded, setup_intent.canceled, withdrawal.created, withdrawal.updated, course_lesson_interaction.completed, payout_method.created, verification.succeeded, payment.created, payment.succeeded, payment.failed, payment.pending, dispute.created, dispute.updated, refund.created, refund.updated, dispute_alert.created, membership.cancel_at_period_end_changed The ID of the resource (company or product) this webhook is attached to.
The secret key used to sign webhook payloads for verification. Include this in your HMAC validation logic.
"whsec_abc123def456"