Skip to main content
Register a HTTPS endpoint in the dashboard (Settings → Developers → Webhooks), or create one with a merchant session. We POST JSON when a payment finishes, fails, or is abandoned. Up to two endpoints per environment. The signing secret is shown once at create time.

Body

Headers:

Events

Verify the signature

Use the webhook secret from the dashboard. HMAC-SHA256 the exact raw bytes of the request body (before JSON parse), hex-encode, prefix sha256=, and compare to X-VestraPay-Signature with a constant-time equals.
If you parse JSON first and re-stringify, whitespace will not match and the signature will fail. Disable body parsers on this route, or keep a copy of the raw buffer.

Respond quickly

Return HTTP 2xx once the signature is valid and the event is queued. Timeout is 10 seconds. Failed deliveries retry up to five times with exponential backoff from 5 seconds. After payment.completed, verify and fulfill once per data.reference. HTTPS only. Localhost and link-local addresses are rejected.