Webhooks Overview
Receive real-time notifications when events occur in your store.
What are Webhooks?
Webhooks are HTTP callbacks that notify your application when events happen in your Pixlpay store. Instead of polling our API, webhooks push data to your server instantly.
How They Work
- You register a webhook endpoint URL
- Events occur in your store (orders, payments, etc.)
- Pixlpay sends an HTTP POST to your URL
- Your application processes the event
Use Cases
- Order Fulfillment - Deliver items when payment is received
- Inventory Sync - Update external systems when products change
- Analytics - Track events in your own analytics platform
- Notifications - Alert your team about new orders
- Automation - Trigger workflows in other tools
Setting Up Webhooks
Via Dashboard
- Go to Settings > Webhooks
- Click Add Webhook
- Enter your endpoint URL
- Select events to receive
- Save the webhook secret
Via API
bash
curl -X POST "https://yourstore.pixlpay.net/api/external/v1/webhooks" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourapp.com/webhooks",
"events": ["order.created", "order.paid"]
}'Webhook Payload
All webhooks are sent as HTTP POST with JSON body:
json
{
"id": "evt_abc123",
"event": "order.paid",
"timestamp": "2025-01-20T12:00:00Z",
"data": {
"id": 1,
"order_number": "ORD-2025-001",
"status": "pending",
"total": "29.99"
}
}Headers
Each webhook includes:
| Header | Description |
|---|---|
Content-Type | application/json |
X-Pixlpay-Signature | HMAC signature for verification |
X-Pixlpay-Event | Event type (e.g., order.paid) |
X-Pixlpay-Delivery-Id | Unique delivery ID |
Requirements
- HTTPS - Webhook URLs must use HTTPS
- Response - Respond with 2xx status within 30 seconds
- Idempotency - Handle duplicate deliveries gracefully
Next Steps
- Events - All available events
- Verification - Verify webhook signatures
- API Reference - Manage webhooks via API
