Skip to content

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

  1. You register a webhook endpoint URL
  2. Events occur in your store (orders, payments, etc.)
  3. Pixlpay sends an HTTP POST to your URL
  4. 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

  1. Go to Settings > Webhooks
  2. Click Add Webhook
  3. Enter your endpoint URL
  4. Select events to receive
  5. 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:

HeaderDescription
Content-Typeapplication/json
X-Pixlpay-SignatureHMAC signature for verification
X-Pixlpay-EventEvent type (e.g., order.paid)
X-Pixlpay-Delivery-IdUnique delivery ID

Requirements

  • HTTPS - Webhook URLs must use HTTPS
  • Response - Respond with 2xx status within 30 seconds
  • Idempotency - Handle duplicate deliveries gracefully

Next Steps

Built for game developers, by game developers.