Skip to main content

Webhooks

Webhooks deliver payment, order, and bridge lifecycle updates from ZKP2P Pay to your server.

Core Event Set

Event TypeDescription
PAYMENT_SETTLEDPayment settled successfully
PAYMENT_FAILEDPayment failed terminally
PAYMENT_EXPIREDPayment quote expired before settlement
PAYMENT_CANCELLEDPayment was cancelled
PAYMENT_CREATEDPayment attempt created
ORDER_CREATEDOrder created
ORDER_FULFILLEDOrder fully fulfilled
ORDER_CANCELLEDOrder cancelled

For final merchant order state updates, treat PAYMENT_SETTLED, PAYMENT_FAILED, PAYMENT_EXPIRED, and ORDER_FULFILLED as the primary events.

Crypto Payment Events

If your payout flow includes bridge execution, also subscribe to bridge lifecycle events:

Event TypeDescription
PAYMENT_BRIDGE_PENDINGBridge transfer queued after settlement
PAYMENT_BRIDGE_SUBMITTEDBridge transfer submitted to provider
PAYMENT_BRIDGE_COMPLETEDBridge transfer completed
PAYMENT_BRIDGE_FAILEDBridge transfer failed

Use these for destination-chain payout tracking. They are additive to the core payment/order events.

Security Headers

HeaderDescription
X-Webhook-IdUnique delivery event id
X-Webhook-TimestampUnix timestamp
X-Webhook-SignatureHMAC-SHA256 signature

See Verification for signature handling.

Retry Policy

Webhook deliveries retry with backoff when your endpoint does not return a 2xx response.

  1. Subscribe to PAYMENT_SETTLED, PAYMENT_FAILED, PAYMENT_EXPIRED, and ORDER_FULFILLED.
  2. Add bridge events if you need cross-chain payout status.
  3. Verify signature and timestamp.
  4. Persist by X-Webhook-Id for idempotency.
  5. Update your merchant order record using data.order.id and data.payment.id.