Skip to main content
OwnPay sends HTTP POST requests to your server when payment events occur. This page is the canonical reference for webhook verification - every other page that mentions webhooks links here.

Webhook payload format

OwnPay sends webhooks as JSON POST requests with three custom headers:
The request body contains the event name, a timestamp, and the event data:

Event types

Signature verification

Always verify the webhook signature before processing any event. Skipping verification lets attackers forge events.

How verification works

OwnPay computes an HMAC-SHA256 hash of the raw request body using your webhook secret. The signature header contains sha256= followed by the hex-encoded HMAC.

PHP verification

Node.js verification

Python verification

Timestamp and replay attack prevention

Every webhook includes the X-OwnPay-Timestamp header. Your receiver should:
  1. Compare the timestamp against your server’s clock
  2. Reject any event with a timestamp more than 5 minutes old
  3. Optionally store processed event IDs to catch duplicate deliveries within the tolerance window

Idempotency

Webhook delivery is at-least-once. Your handler may receive the same event more than once. Always make handlers idempotent:

Expected response

OwnPay considers delivery successful when your endpoint returns any HTTP 2xx status within 10 seconds. Anything else triggers a retry.

Retry schedule

You can inspect and replay failed deliveries from Developers → Webhooks → Delivery Log.
Last modified on August 25, 2026