Skip to main content
PCX delivers webhook events to your registered endpoints when key platform events occur — payment state changes, KYB status updates, virtual account credits, and more.

Registering an endpoint

Configure your webhook URL in Dashboard → Webhooks → Add Endpoint.

Event structure

{
  "event_id": "evt_xxxx",
  "event_type": "payment.completed",
  "created_at": "2025-03-16T10:00:00Z",
  "data": {
    "payment_id": "pay_xxxx",
    "status": "completed",
    "amount": 1000.00,
    "currency": "GBP"
  }
}

Retries

Failed deliveries are retried with exponential backoff over 24 hours. Events that exhaust retries land in a DLQ — contact support to replay them.

Verifying signatures

PCX signs each webhook with an HMAC-SHA256 signature in the X-PCX-Signature header. Verify before processing:
import hmac, hashlib

def verify_signature(payload: bytes, signature: str, secret: str) -> bool:
    expected = hmac.new(secret.encode(), payload, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, signature)