Skip to content

Webhooks ​

Receive real-time notifications when events occur in your store.

Overview ​

Webhooks allow your applications to receive automatic notifications when:

  • Orders are created or completed
  • Payments succeed or fail
  • Subscriptions are created or cancelled
  • And more...

Setting Up Webhooks ​

Step 1: Create a Webhook Endpoint ​

  1. Go to Settings > Webhooks
  2. Click Add Webhook
  3. Enter your endpoint URL (must be HTTPS)
  4. Select events to receive
  5. Click Create

Step 2: Save Your Secret ​

After creation, you'll receive a webhook secret. Save this securely - you'll need it to verify webhook signatures.

Available Events ​

EventDescription
order.createdNew order placed
order.paidPayment received
order.completedOrder fulfilled
order.refundedOrder refunded
subscription.createdNew subscription
subscription.cancelledSubscription cancelled
subscription.renewedSubscription renewed
customer.createdNew customer registered

Webhook Payload ​

All webhooks include:

json
{
  "event": "order.paid",
  "timestamp": "2025-01-20T12:00:00Z",
  "data": {
    // Event-specific data
  }
}

Verifying Webhooks ​

Always verify webhook signatures to ensure they're from Pixlpay:

  1. Get the X-Pixlpay-Signature header
  2. Compute HMAC-SHA256 of the raw body using your secret
  3. Compare the signatures

See the Developer Docs for code examples.

Testing Webhooks ​

Send a test webhook:

  1. Go to Settings > Webhooks
  2. Click Test next to your webhook
  3. Check your endpoint received the payload

Delivery & Retries ​

  • Webhooks timeout after 30 seconds
  • Failed deliveries retry 3 times
  • Retry intervals: 1 min, 5 min, 30 min
  • View delivery logs in webhook settings

Best Practices ​

  • Always verify signatures
  • Respond with 200 status quickly
  • Process webhooks asynchronously
  • Handle duplicate deliveries (use event ID)
  • Log all received webhooks for debugging

Built for game developers, by game developers.