Overview
Webhooks send real-time notifications to your server when events occur in Pelcro. Configure webhook endpoints to receive notifications about subscriptions, payments, customers, and other events. This enables you to build integrations and automate workflows.
How It Works
- Create a webhook — Register your endpoint URL and select events to receive
- Events occur — When selected events happen, Pelcro sends a POST request
- Your server responds — Process the event and return a 2xx status code
- Retry on failure — Failed deliveries are retried with exponential backoff
Example: Create a webhook for subscription_canceled events. When a customer cancels, Pelcro posts the subscription details to your endpoint. Your server updates your CRM and sends a win-back email.
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/core/webhooks | List webhooks |
POST | /api/v1/core/webhooks | Create webhook |
GET | /api/v1/core/webhooks/{id} | Get webhook |
PUT | /api/v1/core/webhooks/{id} | Update webhook |
DELETE | /api/v1/core/webhooks/{id} | Delete webhook |
Webhook Object
| Attribute | Type | Description |
|---|---|---|
id | integer | Unique identifier for the webhook |
url | string | The endpoint URL where events are sent |
description | string | A description of what this webhook is for |
events | array | Array of subscribed event type names |
all_events_enabled | boolean | Whether all event types are enabled |
status | string | enabled or disabled |
created_at | timestamp | Unix timestamp of creation |
updated_at | timestamp | Unix timestamp of last update |
Important Behaviors
- Max 10 webhooks per account. Returns 400 if the limit is reached.
- URL validation: The endpoint URL must return HTTP 200 when called via POST during creation and update.
- URL uniqueness: Each URL can only be used once per account.
- Secret: A unique secret is auto-generated on creation for signature verification. It is not returned in API responses.
- Event names: Use lowercase snake_case format (e.g.
subscription_created,invoice_payment_succeeded,customer_updated). Case-insensitive on input.
