Attributes

Configure endpoints to receive real-time event notifications.

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

  1. Create a webhook - Register your endpoint URL and select events to receive
  2. Events occur - When selected events happen, Pelcro sends a POST request
  3. Your server responds - Process the event and return a 2xx status code
  4. 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

MethodEndpointDescription
GET/api/v1/core/webhooksList all webhooks
POST/api/v1/core/webhooksCreate a webhook
GET/api/v1/core/webhooks/{id}Get a webhook
PUT/api/v1/core/webhooks/{id}Update a webhook
DELETE/api/v1/core/webhooks/{id}Delete a webhook

Webhook Object

AttributeTypeDescription
idintegerUnique identifier for the webhook
urlstringThe endpoint URL where events are sent
descriptionstringA description of what this webhook is for
eventsarrayArray of subscribed event types
all_events_enabledbooleanWhether all event types are enabled
statusstringCurrent status of the webhook
created_attimestampUnix timestamp of creation
updated_attimestampUnix timestamp of last update

Common Event Types

EventDescription
subscription.createdNew subscription started
subscription.renewedSubscription successfully renewed
subscription.canceledSubscription was canceled
invoice.paidInvoice payment succeeded
invoice.payment_failedInvoice payment failed
customer.createdNew customer registered
customer.updatedCustomer profile changed

Related Endpoints