Skip to main content

Webhook Configuration

Get notified the instant a payment succeeds. PayRequest can send a signed HTTP request to your own server every time a Transaction is marked paid β€” regardless of which payment method or provider was used (Mollie, Stripe, PayPal, bank transfer, crypto, etc).
Currently one event is supported: payment.succeeded. You can configure a single webhook URL per account.

Setting Up Your Webhook

1

Open API & Webhook settings

Go to Settings β†’ API Tokens in your dashboard.
2

Enter your webhook URL

Enter the HTTPS endpoint on your server that should receive payment notifications.
3

Save β€” a signing secret is generated

The first time you save a webhook URL, PayRequest generates a webhook secret used to sign every request. You’ll need this to verify incoming requests.
4

Verify signatures on your server

Use the secret to validate the X-PayRequest-Signature header on every request you receive (see below).
You can regenerate your webhook secret at any time from the same settings page if you suspect it’s been exposed. Doing so immediately invalidates the old secret.

Payload

When a transaction is marked paid, PayRequest sends a POST request with this JSON body:

Verifying the Signature

Every request includes an X-PayRequest-Signature header in the form sha256={hmac}, where {hmac} is an HMAC-SHA256 of the raw JSON body, signed with your webhook secret.
Always compare signatures with a constant-time function (like PHP’s hash_equals) to avoid timing attacks. Never compare with == or ===.

Delivery Behavior

  • Webhooks are dispatched asynchronously via a queued job as soon as a transaction is marked paid
  • Requests time out after 10 seconds
  • Delivery is best-effort β€” PayRequest does not currently guarantee automatic retries if your endpoint is unreachable or returns an error, so make sure your endpoint responds quickly and reliably
  • Only one webhook URL is supported per account; every payment.succeeded event goes to the same endpoint
Since delivery isn’t guaranteed to retry, treat webhooks as a fast notification layer rather than your only source of truth. You can always confirm a payment by checking the transaction or invoice status in the PayRequest dashboard or via the API.

Testing Your Endpoint

There’s no built-in webhook test-send tool yet β€” the simplest way to test is to trigger a real (or testmode) payment and confirm your endpoint receives and correctly verifies it. Tools like webhook.site or ngrok are useful for inspecting payloads during local development.

FAQ

Currently only payment.succeeded. Additional events (subscription lifecycle, invoice status changes) are on the roadmap.
Not yet β€” one webhook URL per account. If you need to notify multiple systems, have your endpoint fan the event out internally.
The request will fail and the failure is logged on PayRequest’s side, but it is not automatically retried. Make sure your endpoint has good uptime, and reconcile periodically against the dashboard or API as a safety net.
Yes. The webhook fires whenever a Transaction record is marked paid, regardless of payment method β€” including crypto (USDC), bank transfers, and manually recorded payments.

Next Steps

API Reference

Query transactions and invoices directly instead of (or alongside) webhooks

Webhook Development

Advanced patterns for building against PayRequest webhooks

Smart Links

See how payment_link_id maps back to a Smart Link