OwnPay sends HTTP POST requests to your server when payment events occur. Webhooks let you react to events in real time without polling the API.
How webhooks work
OwnPay considers delivery successful when your endpoint returns HTTP 2xx within 10 seconds. On failure, it retries with exponential backoff.
Configuring an endpoint
- Go to Developers > Webhooks
- Click Add Endpoint
- Enter your URL:
https://your-store.com/webhooks/ownpay
- Select events to receive
- Copy the Webhook Secret
OwnPay only sends webhooks to HTTPS endpoints. Use ngrok for local development.
Event types
Headers:
Body:
Signature verification
Always verify webhook signatures before processing any event.
The signature is computed as:
PHP verification
Node.js verification
Idempotency
Webhook delivery is at-least-once. Your handler may receive the same event more than once. Make all handlers idempotent:
Retry schedule
Testing locally
Use ngrok to expose a local port:
You can also replay recent events from Developers > Webhooks > Delivery Log.