# Create/Register a webhook endpoint Create/Register a webhook endpoint to start receiving events Endpoint: POST /webhooks Version: 1.1.0 Security: secretApiKeyAuth ## Request fields (application/json): - `url` (string) The URL of your webhook endpoint to register Example: "https://example-endpoint.com/webhook" - `active` (boolean) Whether the endpoint is active (receiving events) or not Example: true - `eventTypes` (array) The event types you want the endpoint to receive Enum: "PaymentSession.approved", "PaymentSession.captured", "PaymentSession.declined", "PaymentSession.voided", "PaymentSession.void_failed", "PaymentSession.refunded", "PaymentSession.refund_failed", "PaymentSession.requires_action", "Account.created", "Account.updated", "Account.verification_status_updated", "Person.created", "Person.updated", "Person.deleted", "PayoutMethod.created", "PayoutMethod.updated", "PayoutMethod.deleted", "Payout.created", "Payout.status_updated", "Customer.created", "Customer.updated", "Customer.deleted", "Subscription.created", "Subscription.updated", "Subscription.cancelled", "Subscription.past_due", "Subscription.ended", "Transfer.created", "Transfer.updated", "Dispute.created", "Dispute.closed", "Dispute.challenged", "PlatformFee.created", "PlatformFee.refunded", "InPersonOrder.created", "InPersonOrder.updated", "InPersonLocation.created", "InPersonLocation.updated", "Terminal.created", "Terminal.updated", "Terminal.deleted" ## Response 200 fields (application/json): - `secret` (string) The Webhook's signature secret (only returned on initial creation). Ensure this is stored securely Example: "whs_0f6b1b5a-aef0-4011-978b-19fd4a4d46ea" - `id` (string) The unique Id for the webhook endpoint Example: "wh_31fba123-0fef-41d6-92ad-fd7089f49f8a" - `active` (boolean) Whether the endpoint is actively receiving events or not Example: true - `url` (string) The URL of the webhook endpoint Example: "https://example-endpoint.com/webhook" - `eventTypes` (array) The event types the endpoint is receiving Enum: "PaymentSession.approved", "PaymentSession.captured", "PaymentSession.declined", "PaymentSession.voided", "PaymentSession.void_failed", "PaymentSession.refunded", "PaymentSession.refund_failed", "PaymentSession.requires_action", "Account.created", "Account.updated", "Account.verification_status_updated", "Person.created", "Person.updated", "Person.deleted", "PayoutMethod.created", "PayoutMethod.updated", "PayoutMethod.deleted", "Payout.created", "Payout.status_updated", "Customer.created", "Customer.updated", "Customer.deleted", "Subscription.created", "Subscription.updated", "Subscription.cancelled", "Subscription.past_due", "Subscription.ended", "Transfer.created", "Transfer.updated", "Dispute.created", "Dispute.closed", "Dispute.challenged", "PlatformFee.created", "PlatformFee.refunded", "InPersonOrder.created", "InPersonOrder.updated", "InPersonLocation.created", "InPersonLocation.updated", "Terminal.created", "Terminal.updated", "Terminal.deleted" - `createdTimestamp` (integer) The epoch timestamp (seconds) when the webhook endpoint was created Example: 1470989538 ## Response 400 fields (application/json): - `requestId` (string) Example: "b83f2653-06d7-44a9-a548-5825e8186004" - `code` (string) Example: "400" - `errors` (array) - `errors.message` (string) Example: "Required property 'amount' not found in JSON" ## Response 409 fields (application/json): - `requestId` (string) Example: "b83f2653-06d7-44a9-a548-5825e8186004" - `code` (string) Example: "400" - `errors` (array) - `errors.message` (string) Example: "Required property 'amount' not found in JSON" ## Response 500 fields (application/json): - `requestId` (string) Example: "b83f2653-06d7-44a9-a548-5825e8186004" - `code` (string) Example: "400" - `errors` (array) - `errors.message` (string) Example: "Required property 'amount' not found in JSON"