Skip to content

Webhooks API

Manage webhook endpoints for your store.

List Webhooks

http
GET /api/external/v1/webhooks

Example Request

bash
curl -X GET "https://yourstore.pixlpay.net/api/external/v1/webhooks" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Accept: application/json"

Response

json
{
  "success": true,
  "data": [
    {
      "id": 1,
      "url": "https://yourapp.com/webhooks/pixlpay",
      "events": ["order.created", "order.paid", "order.completed"],
      "is_active": true,
      "created_at": "2025-01-15T10:00:00Z"
    }
  ]
}

Create Webhook

http
POST /api/external/v1/webhooks

Request Body

FieldTypeRequiredDescription
urlstringYesHTTPS endpoint URL
eventsarrayYesEvents to subscribe to

Example Request

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/pixlpay",
    "events": ["order.created", "order.paid", "order.completed"]
  }'

Response

json
{
  "success": true,
  "data": {
    "id": 1,
    "url": "https://yourapp.com/webhooks/pixlpay",
    "events": ["order.created", "order.paid", "order.completed"],
    "is_active": true,
    "secret": "whsec_abc123def456...",
    "created_at": "2025-01-20T15:00:00Z"
  },
  "message": "Webhook created successfully"
}

Important

Save the secret immediately - it's only shown once! Use it to verify webhook signatures.

Get Single Webhook

http
GET /api/external/v1/webhooks/{id}

Update Webhook

http
PUT /api/external/v1/webhooks/{id}

Request Body

json
{
  "url": "https://newurl.com/webhooks",
  "events": ["order.created"],
  "is_active": false
}

Delete Webhook

http
DELETE /api/external/v1/webhooks/{id}

Example Request

bash
curl -X DELETE "https://yourstore.pixlpay.net/api/external/v1/webhooks/1" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

json
{
  "success": true,
  "message": "Webhook deleted successfully"
}

Test Webhook

Send a test payload to your endpoint.

http
POST /api/external/v1/webhooks/{id}/test

Example Request

bash
curl -X POST "https://yourstore.pixlpay.net/api/external/v1/webhooks/1/test" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

json
{
  "success": true,
  "data": {
    "delivered": true,
    "response_code": 200,
    "response_time_ms": 150
  },
  "message": "Test webhook delivered successfully"
}

Webhook Object

FieldTypeDescription
idintegerUnique identifier
urlstringEndpoint URL
eventsarraySubscribed events
is_activebooleanWhether webhook is active
secretstringSigning secret (only on create)
created_atstringISO 8601 timestamp

Errors

StatusErrorDescription
401UnauthorizedInvalid or missing token
403ForbiddenToken lacks required scope
404Not FoundWebhook doesn't exist
422UnprocessableInvalid URL or events

Built for game developers, by game developers.